T> $itemx = "15109";
T>   $num = mysql_query("SELECT quantity FROM inventory WHERE item =
T> '$itemx'",$link);
T>   if ($num < 1) {
T>   echo "<b><font color=\"#FF0000\">Out of Stock $result</font></b>";
T>   } else {
T>   echo "<b><font color=\"#0000FF\">In Stock $result</font></b>";
T>   }

T> I want my inventory quantity with known item number to compare with
T> ($num<1), but didn't work.

You have not yet gotten the result of the query.  Use mysql_result()
or any of the result-related functions to get the actual result of the

All you're doing now is executing the query, which, if you've
connected successfully and there's nothing wrong with your sql, will
return true.

           Julie Meloni 
"PHP Essentials" & "PHP Fast & Easy"
     --- www.thickbook.com ---

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to