General Community > Scripting Help

MySQL syntax error

(1/2) > >>

Shadow:
Ok, I know this is a PHP board, but I didn't see an ASP board, and the problem is MySQL related anyways and doesn't have anything to do with ASP.

Ok, I have the following SQL:

--- Code: ---UPDATE w3t_users SET U_Groups = '-3-11-' WHERE U_Username = 'duncan';
--- End code ---

And I get the following error:

--- Quote ---Microsoft OLE DB Provider for ODBC Drivers error '80040e09'

[MySQL][ODBC 3.51 Driver][mysqld-3.23.49-max-nt]You have an error in your SQL syntax near '{ call Excecute('UPDATE w3t_users SET U_Groups = \'-3-11-\' WHERE U_Username = \' at line 1

/members_forum_auth.asp, line 53
--- End quote ---

It says there is an error in the SQL syntax but I cannot for the life of me find what that error is! Thank you in advance for any help you can provide.

Parham:
i don't see a problem with the query either...

۞:
The query looks ok to me.
Do the table/fields exist?
Also, what code are you using to excecute the query that could be the problem, i.e. you might want to try using double quotes rather than single quotes. Maybe one of the fields cant support that kind of dats? Maybe U_Groups is set to int or something.

Spaceman-Spiff:
try adding () after SET:
SET (U_Groups = '-3-11-')

[Unknown]:
Why is this part of the query.. "{ call Excecute"?

-[Unknown]

Navigation

[0] Message Index

[#] Next page

Go to full version