Jump to content

[SOLVED] count entries


dachshund

Recommended Posts

that's because mysql_num_rows tells you how many rows were returned from your query.  Since you are only selecting count(*) you are only returning 1 row.  You need to use mysql_result or mysql_fetch_array or mysql_fetch_assoc or mysql_fetch_row.  You tried fetch_row and got "array" because fetch_row returns an array of all the columns of the row. 

 

In this particular instance, since you are only selecting count(*), you would echo $commentrow[0] after fetch_row

Link to comment
https://forums.phpfreaks.com/topic/172463-solved-count-entries/#findComment-909255
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.