News:

Wondering if this will always be free?  See why free is better.

Main Menu

MySQL syntax error

Started by Shadow, August 13, 2003, 02:11:39 PM

Previous topic - Next topic

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:
UPDATE w3t_users SET U_Groups = '-3-11-' WHERE U_Username = 'duncan';

And I get the following error:
QuoteMicrosoft 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

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.
Just do it, go Charter! [Unknown] offered me a spot on the dev team! I swear it!

"Sup foos'! I'm Marshie! Capital M and then arshie! I'm going this way!!!"

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.
TTTTTT  OOOOOO MMMMMM   BBBBBB


Spaceman-Spiff

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

[Unknown]

Why is this part of the query.. "{ call Excecute"?

-[Unknown]

Shadow

Thank you to all that replied. The problem was, I'm guessing, an ASP problem. It required me to put () around the WHERE clause. Why? I do not know...

[Unknown], this was an ASP script, and that is how you tell MySQL to do something in ASP. :)

Once again, thank you all.
Just do it, go Charter! [Unknown] offered me a spot on the dev team! I swear it!

"Sup foos'! I'm Marshie! Capital M and then arshie! I'm going this way!!!"

Advertisement: