Jump to content

check DB and Update other


techker

Recommended Posts

Hey guys i need to check a databse and update another Db?

 

can i do this in one script?

 

i have a databse(tblinventory) that i sync(OBDC) with specific fields(price-QTY-SalesPrice..)

 

and i have a cart(Xcart)that i want to update the inventory QTY and price.

 

so  bacsicly i want to check my tbl inventory and sync it with my xcart procuct tbl.

Link to comment
https://forums.phpfreaks.com/topic/209239-check-db-and-update-other/
Share on other sites

ok this is what i got for the query

 

$query2 = "SELECT TbItemInventory.Name, xcart_products.productcode
FROM TbItemInventory, xcart_products
WHERE (
TbItemInventory.Name = xcart_products.productcode
)
LIMIT 0 , 50";



<? while($row1 = mysql_fetch_array($result6)){
echo $row1['Name']. " - ". $row1["productcode"]. " - ".$row1["QuantatyOnHand"];
echo "<br />";
}
?>

 

no this works.now how can i insert a update?

 

tryed this with nosuccess..

 

$sql4 = "UPDATE xcart_products SET avail='$QTY' WHERE productcode='$Name' ";
$result4 = mysql_query($sql4)or die(mysql_connect());

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.