note 92156 added to function.count
| From: | kimzz at hotmail dot com | Date: | Sun, 12 Jul 2009 00:00:57 +0000 |
| Subject: | note 92156 added to function.count | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-158189@lists.php.net to get a copy of this message | ||
I can't get php to give me the right count result
in my DB the dates search have 0 count whereas
another dates have 3-5 count
1 date with no count echo "No go"
another date same echo but mysql count >1
How do i get PHP to show another page that echo "Go ahead"
$result = mysql_query(" SELECT COUNT(*) FROM Inv_id WHERE (date >= '20090716' and
date <= '20090720')AND (Avail='0')")or die(mysql_error());
$total_rows = mysql_fetch_row($result);
if ($row ==0){
echo "Go ahead";}
else{
echo"No go";
}
?>
----
Server IP: 209.41.74.194
Probable Submitter: 70.48.71.20
----
Manual Page -- http://www.php.net/manual/en/function.count.php
Edit -- https://master.php.net/note/edit/92156
Del: integrated -- https://master.php.net/note/delete/92156/integrated
Del: useless -- https://master.php.net/note/delete/92156/useless
Del: bad code -- https://master.php.net/note/delete/92156/bad+code
Del: spam -- https://master.php.net/note/delete/92156/spam
Del: non-english -- https://master.php.net/note/delete/92156/non-english
Del: in docs -- https://master.php.net/note/delete/92156/in+docs
Del: other reasons-- https://master.php.net/note/delete/92156
Reject -- https://master.php.net/note/reject/92156
Search -- https://master.php.net/manage/user-notes.php