I need to select past 30 days data and find the no: rows….i am getting a warning if i am calculating the no: rows. So is there any other alternative to find no: rows in the selected section…..my code is:
$thirty_reg=mysql_query("SELECT * FROM user ORDER BY user.date DESC LIMIT 30");
$num_thirty=mysql_num_rows($thirty_reg);
echo $num_thirty;
A better suggestion to select the past 30 days data also is needed…
Modify your query to this to return rows for the past 30 days.
However, I would recommend fetching the count of rows rather than a record set like so: