#4536 - 09/11/04 02:09 PM
SQL syntax error
|
Jimp
Cheerios
Registered: 07/22/04
Posts: 132
|
Offline
|
|
Hello
I recently added an xtra inventory slot so I now have 4. When i edit users accounts, i get this error below [via the admin panel] :
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 '0, slot4id=", weaponname="none", armorname="none", shieldname="
I have updated my admin.php with all the neccessary code for item slot 4 [i simply copied slot 3].
I dont know whats wrong, can you help please.
I finally went back to the original admin panel, and it was ok but im hoping you may have some suggestions since Ive rechecked my added code over and over and over again. . . .
Cheers if you can help
|
|
Top
|
|
|
#4537 - 09/12/04 05:08 PM
Re: SQL syntax error
|
Gary13579
Frosted Flakes
  
Registered: 07/05/04
Posts: 544
|
Offline
|
|
it might help if you put what you edited in the database and in admin.php
i cant slove it or even try to solove it without that
|
|
Top
|
|
|
#4538 - 09/13/04 12:27 AM
Re: SQL syntax error
|
Jimp
Cheerios
Registered: 07/22/04
Posts: 132
|
Offline
|
|
I wanted to upload it but didnt, if that makes sense.
So can i email u the file, with notes of the changes please?
|
|
Top
|
|
|
#4539 - 09/13/04 01:39 PM
Re: SQL syntax error
|
Jimp
Cheerios
Registered: 07/22/04
Posts: 132
|
Offline
|
|
Heya Jamin,
Do you know why its doing this?
Only things I've changed is whereever it needs me to add more code for the new item slot, and i also have another class called a Rogue, which is also meant I've had to add extra code for class4.
|
|
Top
|
|
|
#4540 - 09/13/04 03:18 PM
Re: SQL syntax error
|
Jamin
Cookie Crisp
  
Registered: 02/25/05
Posts: 2649
Loc: Texas
|
Offline
|
|
quote:
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 '0, slot4id=", weaponname="none", armorname="none", shieldname="
Looks like you're missing an endquote... (in pink)
---Jamin
|
|
Top
|
|
|
#4541 - 09/13/04 03:29 PM
Re: SQL syntax error
|
Jimp
Cheerios
Registered: 07/22/04
Posts: 132
|
Offline
|
|
Hmm.. Im not so sure.
Heres the code I think which is causing the problem
quote: $updatequery = <<<END
UPDATE {{table}} SET
email="$email", verify="$verify", charname="$charname", authlevel="$authlevel", latitude="$latitude",
longitude="$longitude", difficulty="$difficulty", charclass="$charclass", currentaction="$currentaction", currentfight="$currentfight",
currentmonster="$currentmonster", currentmonsterhp="$currentmonsterhp", currentmonstersleep="$currentmonstersleep", currentmonsterimmune="$currentmonsterimmune", currentuberdamage="$currentuberdamage",
currentuberdefense="$currentuberdefense", currenthp="$currenthp", currentmp="$currentmp", currenttp="$currenttp", maxhp="$maxhp",
maxmp="$maxmp", maxtp="$maxtp", level="$level", gold="$gold", experience="$experience",
goldbonus="$goldbonus", expbonus="$expbonus", strength="$strength", dexterity="$dexterity", attackpower="$attackpower",
defensepower="$defensepower", weaponid="$weaponid", armorid="$armorid", shieldid="$shieldid", slot1id="$slot1id",
slot2id="$slot2id", slot3id="$slot3id", weaponname="$weaponname", armorname="$armorname", shieldname="$shieldname",
slot1name="$slot1name", slot2name="$slot2name", slot3name="$slot3name", dropcode="$dropcode", spells="$spells",
towns="$towns", slot4id="$slot4id", slot4name="$slot4name", slot5id="$slot5id", slot5name="$slot5name", WHERE id="$id" LIMIT 1
END;
Where ever i entered the extra slot(s), it changed nothing.
Edited by Jamin to preserve table format.
|
|
Top
|
|
|
#4542 - 09/15/04 01:10 PM
Re: SQL syntax error
|
Jamin
Cookie Crisp
  
Registered: 02/25/05
Posts: 2649
Loc: Texas
|
Offline
|
|
No idea. Email me the file, I guess, and I'll try to look at it this weekend if I get a chance. Make sure you put Dragon Knight in the email subject, though, so Thunderbird knows to not count it as spam or a virus. 
---Jamin
|
|
Top
|
|
|
#4543 - 09/15/04 02:33 PM
Re: SQL syntax error
|
Jimp
Cheerios
Registered: 07/22/04
Posts: 132
|
Offline
|
|
Heya
I couldnt find your email anywhere and I didnt want to use just any old email incase its wrong.
Sorry to be of some nuisence..but what is it?
|
|
Top
|
|
|
#4544 - 09/15/04 03:42 PM
Re: SQL syntax error
|
Jamin
Cookie Crisp
  
Registered: 02/25/05
Posts: 2649
Loc: Texas
|
Offline
|
|
################ - either one will work.
---Jamin
|
|
Top
|
|
|
#4545 - 09/15/04 04:10 PM
Re: SQL syntax error
|
Jimp
Cheerios
Registered: 07/22/04
Posts: 132
|
Offline
|
|
Ok sent
|
|
Top
|
|
|
#4546 - 09/18/04 05:47 PM
Re: SQL syntax error
|
Gary13579
Frosted Flakes
  
Registered: 07/05/04
Posts: 544
|
Offline
|
|
quote: Originally posted by Jamin:
################ - either one will work.
---Jamin
*shakes head*
you really do like spam, dont you?
|
|
Top
|
|
|
#4547 - 09/18/04 08:59 PM
Re: SQL syntax error
|
Jamin
Cookie Crisp
  
Registered: 02/25/05
Posts: 2649
Loc: Texas
|
Offline
|
|
Robots can't index Eve pages.
---Jamin
|
|
Top
|
|
|
#4548 - 09/19/04 01:09 PM
Re: SQL syntax error
|
Jimp
Cheerios
Registered: 07/22/04
Posts: 132
|
Offline
|
|
I emailed you the file and gave it a good subject so you wouldnt delete it but i was wondering if u did delete it or even receive it?
Please let me know, cheers
|
|
Top
|
|
|
#4549 - 09/19/04 02:47 PM
Re: SQL syntax error
|
Jamin
Cookie Crisp
  
Registered: 02/25/05
Posts: 2649
Loc: Texas
|
Offline
|
|
Ok, I fixed it. You had an comma after the last field name in the set list. It works for me now, as far as I can tell. I attached the fixed file to this post, so download it and it ought to work for you.
BTW, Gary, you got me all paranoid now (even though according to Infopop, robots can't index Eve pages), so I edited those addys out. 
---Jamin
|
|
Top
|
|
|
#4550 - 09/19/04 03:32 PM
Re: SQL syntax error
|
Gary13579
Frosted Flakes
  
Registered: 07/05/04
Posts: 544
|
Offline
|
|
yes, being paranoid rules. why you ask? cause nothing happens that you werent prepared for 
from one of my many chat convos...
Im a pessmist. I love it.
Whys that?
cause nothing that happens is worse then what your prepared for.
Wait, that was optimistic....
|
|
Top
|
|
|
|
|