You are here: Re: better practice - php code or multiple mysql queries? « PHP Programming Language « IT news, forums, messages
Re: better practice - php code or multiple mysql queries?

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
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация