You are here: Re: single result « PHP SQL « IT news, forums, messages
Re: single result

Posted by J.O. Aho on 02/12/06 18:02

Thoren wrote:

> Is there a way to proceed when you expect only one row from an SQL result ?

Proceed from where?

You can use 'LIMIT 1' in your SQL query if you want to be sure to only get one
line. You don't have to use fetch_array_mysql (or what ever SQL you are using)
more than once, even if there would be a million of results (in this case
LIMIT in the query is a lot better as it uses less RAM and CPU).


//Aho

 

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

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