Jump to content

UPDATE MYSQl PROBLEM


Redlightpacket

Recommended Posts

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'")

Link to comment
https://forums.phpfreaks.com/topic/144950-update-mysql-problem/
Share on other sites

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'")

Link to comment
https://forums.phpfreaks.com/topic/144950-update-mysql-problem/#findComment-760750
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.