PLS Help! - Insert Statement not working
Posted by: sysgod (---.kc.res.rr.com)
Date: March 04, 2007 11:21PM

I keep getting this error -> 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 'CHARACTER (account, firstname, lastname, race, cclass, exp, lvl, st, dx, cn, iq,' at line 1

This is my insert statement. I do not see any issue with it. Pls, any guidance would be appreciated! smiling smiley

$sql = "INSERT INTO CHARACTER (account, firstname, lastname, race, cclass, exp, lvl, st, dx, cn, iq, wi, ch, hp, maxhp, mana, maxmana, gold, bankgold, head, hands, torso, legs, arms, neck, back, waist, ear1, ear2, feet, wrist1, wrist2, ring1, ring2, offhand, weapon, ammo, ammoamt, backpackid, spellbook, online, location, hair, eyes, hairlength, email, pwd, created)
VALUES
('','$fname','$lname','$race','$cclass',0,1,'$st','$dx','$cn','$iq','$wi','$ch','$hp','$maxhp','$mana','$maxmana',25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,'$hair','$hairlength','$eyes','$email','$pwd',NOW())";

EDIT: I fixed this problem.

You can't use "character" as a table name.



Post Edited (03-04-07 23:44)

Options: ReplyQuote
Re: PLS Help! - Insert Statement not working
Posted by: CyberSpatium (71.237.217.---)
Date: March 10, 2007 11:07PM

yup, character is a mysql reserved work, that is why you can not use it for a table name or a column name.

[dev.mysql.com]



CyberSpatium
----------------------
WAMP English Forum Admin

Options: ReplyQuote


Sorry, only registered users may post in this forum.