Jump to content

SQLite syntax error


xyzii

Recommended Posts

  • 3 weeks later...
17 hours ago, xyzii said:

con:exec("CREATE TABLE IF NOT EXISTS ´"..player.account.name.."´ ('num', 'veh', 'x', 'y', 'z', 'rot', 'bp', 'ups', 'plate', 'hp', 'fuel', 'lock', 'r', 'g', 'b', 'r2', 'g2', 'b2', 'paintjob')")

The entire way you do it is the error. You shouldn't create a new table for every player that registers...
Also you should never use .. to create SQL querys...like this your database is very open to SQL injections.

The proper way to do it would be a table with vehicles and a column with the account name to identify the vehicle owner.

 

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...