Redlightpacket Posted February 12, 2009 Share Posted February 12, 2009 i'm trying to get this statement to work but it don't work. How do you get "$username" part to work. What i'm trying to do is update the publictb from multiple user tables. $result = mysql_query("UPDATE $username, publictb SET scriptref='$scriptref' AND scripture ='$scripture' AND WHERE id='$id' AND scriptref='$scriptref' AND scripture ='$scripture'") Quote Link to comment https://forums.phpfreaks.com/topic/144950-update-mysql-problem/ Share on other sites More sharing options...
revraz Posted February 12, 2009 Share Posted February 12, 2009 Show us what it should say without a variable. Also, you don't use AND in your SET function, use a comma. Don't use AND before your WHERE. $result = mysql_query("UPDATE $username, publictb SET scriptref='$scriptref', scripture ='$scripture' WHERE id='$id' AND scriptref='$scriptref' AND scripture ='$scripture'") Quote Link to comment https://forums.phpfreaks.com/topic/144950-update-mysql-problem/#findComment-760750 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.