I have a database of order status’ and I’d like to return the amount of rows for which the value of that row is anything but Complete.
How would I go about this? I have the following which shows how much rows has ‘New’ as the status for the order. But I’d like to show all rows except ones with the od_status of Complete.
<?php
$query = "SELECT od_status FROM tbl_order WHERE od_status = 'New'";
$result = mysql_query($query) or die(mysql_error());
$num_rows = mysql_num_rows($result);
echo "$num_rows";
?>
1 Answer