I have a published field that has either a value of 1 or 0. I want to be able to alert the user to how many records require publishing, or are unpublished. I want to count the number of records from table testimonials where published is equal to 0 and output that value as
Awaiting to be published:#with published=0
I have this and I realize it is wrong:
$sql = mysql_query("SELECT * FROM testimonials WHERE published='0'");
$result=mysql_num_rows($sql);
echo $result;
1 Answer