What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » What is wrong with this SQL query???

What is wrong with this SQL query???
Author: Message:
Jammie
New Member
*


Posts: 4
– / Male / –
Joined: Sep 2004
O.P. What is wrong with this SQL query???
Hi.

I have now been bugged by this for the last half an hour and i cannot work out what is wrong with it. The query is:

code:
UPDATE `photo_sessions` SET time= 1095442814 WHERE sessionid= 'f9e4a5954785196010148e1c2567b556'


And i get the following error:

quote:
Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement., SQL state 37000 in SQLExecDirect in d:\phpportal\work\projects\image\database.php on line 30
UPDATE `photo_sessions` SET time= 1095442814 WHERE sessionid= 'f9e4a5954785196010148e1c2567b556'


I would usually use mysql but im having to use access for this person.

Any help would be great as im rather baffled!

Jamie

This post was edited on 09-17-2004 at 05:51 PM by Jammie.
09-17-2004 05:50 PM
Profile E-Mail PM Web Find Quote Report
WDZ
Former Admin
*****

Avatar

Posts: 7107
Reputation: 107
– / Male / Flag
Joined: Mar 2002
RE: What is wrong with this SQL query???
Hmm... I'm not sure, as I only use MySQL. Maybe you could try...

- enclosing the timestamp in quotes: SET time= '1095442814'
- enclosing the field name "time" in backquotes, because it might be a reserved keyword: SET `time`=
09-17-2004 06:04 PM
Profile PM Web Find Quote Report
Jammie
New Member
*


Posts: 4
– / Male / –
Joined: Sep 2004
O.P. RE: What is wrong with this SQL query???
the `time` fixed the problem. I didnt think of that.

Thanks!
09-17-2004 06:11 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On