Stooney Posted December 8, 2007 Share Posted December 8, 2007 having some probs, just checking my syntax: (mysql 5) $query=("UPDATE `stauctioneer_tableitems` SET `itemnum`='1' WHERE `table` = '11' AND `slot`='1'"); Quote Link to comment Share on other sites More sharing options...
BenInBlack Posted December 8, 2007 Share Posted December 8, 2007 why are you quoting what appears to be integer columns ='1' = '11' "UPDATE stauctioneer_tableitems SET itemnum = 1 WHERE table = 11 AND slot=1" Quote Link to comment Share on other sites More sharing options...
Stooney Posted December 8, 2007 Author Share Posted December 8, 2007 well those are generally variables, that line was the result of my printing the query. so pre-print: $update="UPDATE `stauctioneer_tableitems` SET `itemnum`='$slot[$k]' WHERE `table` = '$tableid' AND `slot`='$k'"; Quote Link to comment Share on other sites More sharing options...
noidtluom Posted December 8, 2007 Share Posted December 8, 2007 well those are generally variables, that line was the result of my printing the query. so pre-print: $update="UPDATE `stauctioneer_tableitems` SET `itemnum`='$slot[$k]' WHERE `table` = '$tableid' AND `slot`='$k'"; Remove the single quotes around the variables. Quote Link to comment Share on other sites More sharing options...
revraz Posted December 8, 2007 Share Posted December 8, 2007 Syntax looks right, what error do you get? If its just not updating, make sure you are in fact sending the right type of data for that column. If they are all set to Integer, make sure your variables are not Strings. Put a error check after the query to see if you have a error in your statement. Quote Link to comment 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.