Home   -   News   -   Game Tour   -   Screenshots   -   Rules   -   Chat   -   Contact   -   Forum
pt ro hu de es
pl it no nl en
The Land of Destiny Hero welcomes you.
Role playing game or called MMORPG free browser game
Posts

Breadcrumbs to navigate the website Homepage / Forum / Personal projects / error



Topic: error Post reply

Page: 1

Moderator Posted on: 23-06-2008 17:30:06
Posts: 461



I've got an error in my scripty, it says I've got a wrong parameter error, but now it says i've got a error in my sql syntax,
mysql_query("UPDATE pm_inbox SET read = '1' WHERE id = '".$id."' LIMIT 1") or die(mysql_error());

but as far as i can see it's good

current 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 'read = '1' WHERE id = '44' LIMIT 1' at line 1
Member Posted on: 23-06-2008 17:38:51
Posts: 822



I guess "read" is some kind of SQL command. You'd better change the name of that field to "msg_read" or something similar.
Moderator Posted on: 23-06-2008 17:39:35
Posts: 461



ah i'll give it a try (if it's an sql command, shouldn't it only be good when its in CAPS?)
Member Posted on: 23-06-2008 17:41:08
Posts: 822



Don't think commands are case sensitive (at least, in MySQL) But when changing the column name, it worked over here.
Moderator Posted on: 23-06-2008 17:42:29
Posts: 461



It works thanks, i wouldn't have figured out that
Member Posted on: 23-06-2008 17:45:52
Posts: 822



You will by devving a lot.
Moderator Posted on: 23-06-2008 17:49:26
Posts: 461



yea and by asking questions to people who dev a lot
Developer Posted on: 23-06-2008 18:32:41
Posts: 3379



if you quote 'read' it should also work.

http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html

Page: 1

You have to register or login first before you are able to reply.
LoD is a free online rts game free online MMORPG