RE: [PHP-DB] Wrong solution!!!!

2001-07-21 Thread David Balatero
I assume you want to do this instead..try it: ?php $itemx = 15109; $sql = SELECT quantity FROM inventory WHERE item = '$itemx'; $result = mysql_query($sql,$link); $row = mysql_fetch_array($result); // you have to fetch the result into an array to access the info in the db $num = $row[quantity];

Re: [PHP-DB] Wrong solution!!!!

2001-07-21 Thread Julie Meloni
T $itemx = 15109; T $num = mysql_query(SELECT quantity FROM inventory WHERE item = T '$itemx',$link); T if ($num 1) { T echo bfont color=\#FF\Out of Stock $result/font/b; T } else { T echo bfont color=\#FF\In Stock $result/font/b; T } T I want my inventory quantity with