techker Posted June 21, 2011 Share Posted June 21, 2011 hey guys i made scripts that update's a cart database.. but i have 1 page that updates the qty then it refreshes to go to page 2 that updates the price 1 then refresh to go to page 3... is it possible to combine all the queries in one page? like 1 execute this query first the execute query 2 .... exaple of my query's $sql2 = "UPDATE xcart_products p LEFT JOIN TbItemInventory pp ON p.productid = pp.XcartID SET p.avail = pp.QuantityOnHand WHERE p.productid = pp.XcartID"; $retval = mysql_query( $sql2 ); if(! $retval ) { die('Could not update data: ' . mysql_error()); } echo "All QTY Updated successfully"; echo "<meta http-equiv=Refresh content=2;url=3.php>"; this will go to the second page that will update my prices.. Quote Link to comment https://forums.phpfreaks.com/topic/239984-all-in-one-page/ Share on other sites More sharing options...
AMcHarg Posted June 21, 2011 Share Posted June 21, 2011 Yep, just list them all one after the other. Quote Link to comment https://forums.phpfreaks.com/topic/239984-all-in-one-page/#findComment-1232728 Share on other sites More sharing options...
techker Posted June 21, 2011 Author Share Posted June 21, 2011 So it will execute the query's one afthere the other?can this cause an overflow or something ?? Quote Link to comment https://forums.phpfreaks.com/topic/239984-all-in-one-page/#findComment-1232757 Share on other sites More sharing options...
AMcHarg Posted June 21, 2011 Share Posted June 21, 2011 Oh are referring to the time it takes to do the queries causing a timeout problem? Quote Link to comment https://forums.phpfreaks.com/topic/239984-all-in-one-page/#findComment-1232765 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.