Jump to content
  • 0

Is there a way to add item_db.txt to item_db.sql easily ?


Truly

Question


  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  201
  • Reputation:   47
  • Joined:  11/17/11
  • Last Seen:  

Alright i just Re edited this post after finding my previous question out, but i have a new one haha. Basically i made my server use the sql db for the items and mobs, but i have a ton of custom items as well as newer / updated items that the sql file doesnt. Is there a way for me to easily add them to the sql file?

Thanks,

Truly~

+Edit: I managed to just copy over the updated sql files from the most recent revision, but im getting errors for the incorrect syntax:

#1064 - 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 'REPLACE INTO `item_db` VALUES (5654,'Holy_Marching_Hat_J','Holy Marching Hat',5,' at line 54 

I cant seem to find any "reserved words" in play here... o.o

Edited by Truly
Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  186
  • Reputation:   51
  • Joined:  11/14/11
  • Last Seen:  

+Edit: I managed to just copy over the updated sql files from the most recent revision, but im getting errors for the incorrect syntax:

#1064 - 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 'REPLACE INTO `item_db` VALUES (5654,'Holy_Marching_Hat_J','Holy Marching Hat',5,' at line 54 

I cant seem to find any "reserved words" in play here... o.o

Mostly the error dosnt relies to the shown code, but lines before that.

May you pleased enough to put the whole sql statement in a codebox?

Even your inistial request is solved, i just wnat to say - google :o

There are many txt to sql converter out there: eAtehna txt 2 sql converter

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  201
  • Reputation:   47
  • Joined:  11/17/11
  • Last Seen:  

Oh wow haha did not think it was that simple, my b ! Will make sure to use google for any question, no matter the situation haha.

And for the SQL error, it in a whole shows this:

Error
SQL query:
# REPLACE INTO `item_db` VALUES (5597,'Bubble_Gum_In_Mouth','Bubble Gum In Mouth',5,20,NULL,0,NULL,2,NULL,0,0xFFFFFFFF,7,2,1,NULL,1,0,572,'bonus bMdef,2;',NULL,NULL); # REPLACE INTO `item_db` VALUES (5598,'Virgo_Crown','Virgo Crown',5,20,NULL,300,NULL,3,NULL,1,0xFFFFFFFF,7,2,256,NULL,70,1,573,'bonus bDex,2; bonus bAspdRate,1; if(getrefine()>6) { bonus2 bSubEle,Ele_Earth,5; autobonus "{ bonus bDex,20; }",10,6000,BF_WEAPON,"{ specialeffect2 EF_ENHANCE; }"; }',NULL,NULL); # REPLACE INTO `item_db` VALUES (5599,'Virgo_Diadem','Virgo Diadem',5,20,NULL,300,NULL,3,NULL,1,0xFFFFFFFF,7,2,256,NULL,70,1,574,'bonus bAspdRate,3; bonus2 bSubEle,Ele_Earth,5; if(getrefine()>6) bonus3 bAutoSpell,"MO_BALKYOUNG",1,50;',NULL,NULL); # REPLACE INTO `item_db` VALUES (5600,'Br_Twin_Ribbon','Brazil Twin Ribbon',5,20,NULL,100,NULL,1,NULL,0,0xFFFFFFFF,7,2,256,NULL,1,1,575,'bonus bAllStats,3; bonus bMdef,1;',NULL,NULL); # REPLACE INTO `item_db` VALUES (5601,'Br_Beret','Brazil Beret',5,20,NULL,100,NULL,[...]
MySQL said:
#1064 - 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 'REPLACE INTO `item_db` VALUES (5665,'Shaman_Hat','Shaman Hat',5,20,NULL,400,NULL' at line 69

+Edit alright all things aside the converter seems to be my hero, after converting the appropriate files i get no errors, and it seems to work fine, thanks a ton GodLesZ !

Edited by Truly
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  186
  • Reputation:   51
  • Joined:  11/14/11
  • Last Seen:  

Hehe even again, just as info for other poeple..

I always got this error while import the basic item and/or mob sql data from eAtehna.

This seems to relies on the rhombus (#), which is usally a comment style of mysql.

Just remove every line beginning with an # and all should be fine.

Glad to help ya :o

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

Were you using phpMyAdmin to import? I remember some old topics and bug reports where other users had similar issues (I think it's a phpMyAdmin bug).

Officially, MySQL Server is supposed to support these 3 types of comments:

# this is a comment until the end of the line

-- this is also a comment until the end of the line

/* this is a long comment
that can extend over multiple lines */

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  201
  • Reputation:   47
  • Joined:  11/17/11
  • Last Seen:  

Ahh yeah i was using phpmyadmin to import, and i believe the # was my problem. Thanks for the info guys !

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  80
  • Reputation:   0
  • Joined:  07/03/12
  • Last Seen:  

how about item_db2 converteR?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  353
  • Reputation:   70
  • Joined:  07/14/12
  • Last Seen:  

how about item_db2 converteR?

i think this is possible if you make a application for it

 

ill try

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...