View Single Post
Old 12-27-2012, 09:26 PM  
Nookster
Confirmed IT Professional
 
Industry Role:
Join Date: Nov 2005
Location: Hollywood, CA
Posts: 3,744
You need to CAST the count to a named variable...

Code:
$query="SELECT COUNT(*) AS numrows FROM $table_name";
$ret = mysql_query($query);
$fetched = mysql_fetch_array($ret);
echo 'Amount = '.$fetched['numrows'];
That's some really horrible code, btw.

...glad you got it sorted out.
Nookster is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote