Posted by robert on 09/28/86 11:47
<snip>
| I offered the "magic code"
| alternative as a way for him to avoid modifying code he was unsure
| about.
again, magic code is NEVER a good plan, strategy, or methodology for any
programming endeavor. and what's worse is that you are encouraging this kind
of bad behavior/habit in someone whom you believe is completely new
tocoding. that's worse than bad form!
the IDEAL solution would be to handle this in the sql statement and NOT the
code...like:
SELECT *
FROM foo
WHERE fieldSearched = '$valueToFind'
AND '$valueToFind' != ''
problem solved!
Navigation:
[Reply to this message]
|