Jump to content

Count Rows in phpMyAdmin


matvespa

Recommended Posts

Hi. I having trouble with counting rows in phpmyadmin.

 

It works fine this way:

$result_rows = mysql_query("SELECT * FROM events");

 

But when i modify the code to this it doesnt work at all.

$result_rows = mysql_query("SELECT * FROM events WHERE category = 'adults' ORDER BY 'date'");

 

Any idea what is wrong?

Link to comment
https://forums.phpfreaks.com/topic/245932-count-rows-in-phpmyadmin/
Share on other sites

if you want to know the number of results you have to use "count" like this..

$result_rows = mysql_query("SELECT count(*) FROM events WHERE category = 'adults' ORDER BY 'date'");

 

If that is not what you are looking for then you will have to give me more info.  Your post is vague as you don't tell us if there are any error messages or exactly what the issue is.

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.