mysql update - killing myself here
Posted: Sun Jul 22, 2007 11:35 pm
hey all,
I've been trying to figure this one out for some time now.
I call this function to validate a user, and I get this error
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group = '1' where id ='10'' at line 1
code for the function :
code for what calls it :
Please don't tell me that group is a term like desc and can't be used...
Thanks in advance.
I've been trying to figure this one out for some time now.
I call this function to validate a user, and I get this error
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group = '1' where id ='10'' at line 1
code for the function :
Code: Select all
function validate($id) {
$sql = mysql_query("update watch_users set group = '1' where id ='$id'") or die(mysql_error());
}Code: Select all
if($_GET['do'] == "validate") {
validate($_POST['user_id']);
echo "<h4>user validated</h4>";
}Thanks in advance.