Jump to content

Save character with ' in SQL.


Recommended Posts

Hey, I'm saving some info on the SQLite based system from MTA, but when I want to save a word with ' character(EX: Amoxicilin tablet's), it gives me some errors.

How can I do to save it without those errors?

Thanks

BTW is there any onServerShutdown event?

So when the server shutdows, I can save all players stats.

Link to comment
Did you try this:
executeSQLUpdate ( 'TestTable', "Value = 'Amoxicilin tablet\ 's'" ) 

Well, I just used string.gsub, replacing ' with '' and seems to work fine.

There's no such event, but i used onResourceStop to save them :D

Ah, I didn't think about it, gonna try, thanks.

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...