I'm trying to get the total rows in a given table. Then, if that number is bigger than __ display another message.
For learning sakes (I don't really have a travel agency

) I made a DB called Vacation. From there it has tables called "jamaica", "bolivia", and "haiti". Those each have 2 rows, "name" and "total". The total is an auto incremental MEDIUMINT.
Here's the part I think I am having problems with:
Code: Select all
$getTotal = "SELECT COUNT(total) FROM jamaica";
$totalResult = mysql_query($getTotal, $db);
if($totalResult > 4){
echo "The trip is filled. Please try one of out other options.";
}
How would I get it to see that the count is more than 4 (which it is in my case)?