Jump to content
  • Create New...
  • 0

[How to fix] About mysql_query()



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

  • Answers 8
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

8 answers to this question

Recommended Posts

  • 0
  • Bot

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)


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

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.