single result
am 12.02.2006 16:48:07 von ThorenHi,
Is there a way to proceed when you expect only one row from an SQL result ?
Thanks.
Hi,
Is there a way to proceed when you expect only one row from an SQL result ?
Thanks.
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