Posted by Jerry Stuckle on 01/21/08 14:37
The Natural Philosopher wrote:
> Jerry Stuckle wrote:
>> Willem Bogaerts wrote:
>>>> 4) Never ask for more data then you're really sure you're going to use.
>>>> The numerous times I've seen 'SELECT *' in production code...
>>>> --Rik Wasmus
>>>
>>> Ah, that would be my code. I never put more fields in a table than I'm
>>> interested in. So SELECT * gives me exactly all fields I'm interested
>>> in...
>>>
>>> Regards,
>>
>> It's still not a good idea to use SELECT *. What happens if the next
>> programmer comes along and adds a 10Mb BLOB column to the table and
>> stuffs 10MB images in it?
>>
> One had better hope he also adjusts the myqsql calls ;-)
>
If the code is properly written, the next programmer only has to adjust
the calls which need to return the new field.
SELECT * is just sloppy programming.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|