View Single Post
Old 12-04-2007, 07:23 AM   #7 (permalink)
SOCK
The Acquainted
 
Join Date: Nov 2007
Posts: 154
Thanks: 31
SOCK is on a distinguished road
Default

Haris is correct, but I think everyone is overlooking a crucial detail; you're only retrieving one row, the value of the COUNT. Regardless of how many records match that SQL statement, there will only ever be one row. Therefore the value will always be accessed at the first index, '0'.

It's wasteful to use fetch_array on a statement like this anyway - use mysql_result() instead.
SOCK is offline  
Reply With Quote