Jump to content

[How to fix] About mysql_query()


Go to solution Solved by Metin2 Dev,

Recommended Posts

I use Vanilla Core 2.3 game & DB and Mysql 5.5

when i set --os.execute('mysql '..pre..' --e='..string.format('%q',query)..' > '..fi) -- für MySQL51 , I run the quest .syserr note: RunState: LUA_ERROR: locale/newcibn/quest/questlib.lua:1862: attempt to call global `split' (a nil value)

when i set -- os.execute('mysql '..pre..' -e'..string.format('%q',query)..' > '..fi) -- für MySQL55 I run the quest .syserr note :mysql: ambiguous option '--e=SELECT * FROM player.item where item.id = '400000675' order by item.id desc limit 1;' (enable_cleartext_plugin, execute)

Please help me

Link to comment
Share on other sites

  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

  • Bot
  • Solution

Delete this questlib mysql function and use the ones provided by vanilla:

game.mysql_real_escape_string(query) (Not needed for your stuff)
game.mysql_query(query)(Returns a result use this for SELECT)
game.mysql_update_query(query)(Returns no result use this for UPDATE | INSERT etc)
 

english_banner.gif

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.