sanchez77 Posted August 2, 2009 Share Posted August 2, 2009 For some reason, :facewall: , i can't figure out why the table lockermaster won't update $masterid = mysql_query("SELECT masterid FROM lockers WHERE lockerno = '$_POST[lockerno]' LIMIT 0, 30"); mysql_query("UPDATE lockersmaster SET timeout = '$timeout', dateout = '$dateout', storetimeout = '$storetimeout' WHERE id = '$masterid'"); Quote Link to comment https://forums.phpfreaks.com/topic/168544-query-question/ Share on other sites More sharing options...
kickstart Posted August 2, 2009 Share Posted August 2, 2009 Hi You haven't brought back a value for $masterid. All it will contain is a result set. All the best Keith Quote Link to comment https://forums.phpfreaks.com/topic/168544-query-question/#findComment-889116 Share on other sites More sharing options...
sanchez77 Posted August 2, 2009 Author Share Posted August 2, 2009 how do i do that? Quote Link to comment https://forums.phpfreaks.com/topic/168544-query-question/#findComment-889119 Share on other sites More sharing options...
ldougherty Posted August 2, 2009 Share Posted August 2, 2009 You will want to use mysql_fetch_array to retrieve the values in the array returned in the $masterid value. You can see a good working example at http://www.tizag.com/mysqlTutorial/mysqlquery.php Quote Link to comment https://forums.phpfreaks.com/topic/168544-query-question/#findComment-889150 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.