Jump to content

Count?


slipperyfish

Recommended Posts

How can I put the result from a count() query into a variable?

So far im trying:

[code]$totalSQL = "SELECT COUNT(*) FROM feedback";
    $tq = mysql_query($totalSQL);
    $tr = mysql_fetch_array($tq);[/code]

and trying to use "$tr" as the variable.. like:

[code]print $tr;[/code]

but not having much look.. i know there is 12 rows.. however not printing anything.

Help appreciated..
Link to comment
https://forums.phpfreaks.com/topic/5858-count/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.