techker Posted July 29, 2010 Share Posted July 29, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/209239-check-db-and-update-other/ Share on other sites More sharing options...
fenway Posted July 29, 2010 Share Posted July 29, 2010 Sync how? Quote Link to comment https://forums.phpfreaks.com/topic/209239-check-db-and-update-other/#findComment-1092738 Share on other sites More sharing options...
techker Posted July 29, 2010 Author Share Posted July 29, 2010 with a obdc connector. its fast and free http://www.bullzip.com/download.php so i dump it in all the info.but i need to update the xcart product table Quote Link to comment https://forums.phpfreaks.com/topic/209239-check-db-and-update-other/#findComment-1092761 Share on other sites More sharing options...
techker Posted July 29, 2010 Author Share Posted July 29, 2010 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()); Quote Link to comment https://forums.phpfreaks.com/topic/209239-check-db-and-update-other/#findComment-1092809 Share on other sites More sharing options...
fenway Posted July 30, 2010 Share Posted July 30, 2010 maybe with mysql_error() you'd get some useful information. Quote Link to comment https://forums.phpfreaks.com/topic/209239-check-db-and-update-other/#findComment-1093139 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.