PHP not selecting MySQL row...

From: Date: Mon, 13 Nov 2000 21:18:03 +0000
Subject: PHP not selecting MySQL row...
Groups: php.general 
Request: Send a blank email to php-general+get-25030@lists.php.net to get a copy of this message
Hello everybody, I'm doing a shopping cart. The cartID is stored as a cookie on the users system and in the database. The users can change the contents of their cart within 30 days. Now, the code below shows the current items in the cart (it's simplified). /******** Start code ********/ $viewcart = mysql_query("SELECT * FROM kiba_items WHERE (db_item_cartID=$cartID)",$db); while ($myrow = mysql_fetch_array($viewcart)) { $getmyid=$myrow["db_itemID"]; $getmore = mysql_query("SELECT id,description FROM kibabaas WHERE id=$getmyid",$db); $getdesc = mysql_query($getmore); $main_db_description=$getdesc["description"]; ?> <a href="<?echo $PHP_SELF;?>?view=view&IDitemdelete=<?echo $myrow["db_itemID"];?>">Delete</a> <b><?echo $myrow["db_name"];?></b> <?echo nl2br($main_db_description);?> <?echo$myrow["db_price"];?> <?echo $myrow["db_quantity"];?> <?}?> /******** End code ********/ Now, I see everything except the description (which is taken from another database). Any ideas? Yours, Lauri Väin

« previous php.general (#25030) next »