Jump to content

SQL Error!


Recommended Posts

I'm geting the datebase error like;

Datebase query failed: no such column: (nickname)

           local addVehicle = executeSQLQuery("INSERT INTO carslot3 (PlayerName,Model,Cost,Paintjob,Color,Upgrade0,Upgrade1,Upgrade2,Upgrade3,Upgrade4,Upgrade5,Upgrade6,Upgrade7,Upgrade8,Upgrade9,Upgrade10,Upgrade11,Upgrade12,Upgrade13,Upgrade14,Upgrade15,Upgrade16) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", tostring(name), tonumber(id), tonumber(cost), tonumber(paintjob), tostring(color), " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ")

 

Edited by Gabriele01
1
Link to comment

function createsql ()
executeSQLQuery("CREATE TABLE IF NOT EXISTS carslot1 (PlayerName TEXT, Model NUMERIC, Cost NUMERIC, Paintjob NUMERIC, Color TEXT, Upgrade0 NUMERIC, Upgrade1 NUMERIC, Upgrade2 NUMERIC, Upgrade3 NUMERIC, Upgrade4 NUMERIC, Upgrade5 NUMERIC, Upgrade6 NUMERIC, Upgrade7 NUMERIC, Upgrade8 NUMERIC, Upgrade9 NUMERIC, Upgrade10 NUMERIC, Upgrade11 NUMERIC, Upgrade12 NUMERIC, Upgrade13 NUMERIC, Upgrade14 NUMERIC, Upgrade15 NUMERIC, Upgrade16 NUMERIC)")
executeSQLQuery("CREATE TABLE IF NOT EXISTS carslot2 (PlayerName TEXT, Model NUMERIC, Cost NUMERIC, Paintjob NUMERIC, Color TEXT, Upgrade0 NUMERIC, Upgrade1 NUMERIC, Upgrade2 NUMERIC, Upgrade3 NUMERIC, Upgrade4 NUMERIC, Upgrade5 NUMERIC, Upgrade6 NUMERIC, Upgrade7 NUMERIC, Upgrade8 NUMERIC, Upgrade9 NUMERIC, Upgrade10 NUMERIC, Upgrade11 NUMERIC, Upgrade12 NUMERIC, Upgrade13 NUMERIC, Upgrade14 NUMERIC, Upgrade15 NUMERIC, Upgrade16 NUMERIC)")
executeSQLQuery("CREATE TABLE IF NOT EXISTS carslot3 (PlayerName TEXT, Model NUMERIC, Cost NUMERIC, Paintjob NUMERIC, Color TEXT, Upgrade0 NUMERIC, Upgrade1 NUMERIC, Upgrade2 NUMERIC, Upgrade3 NUMERIC, Upgrade4 NUMERIC, Upgrade5 NUMERIC, Upgrade6 NUMERIC, Upgrade7 NUMERIC, Upgrade8 NUMERIC, Upgrade9 NUMERIC, Upgrade10 NUMERIC, Upgrade11 NUMERIC, Upgrade12 NUMERIC, Upgrade13 NUMERIC, Upgrade14 NUMERIC, Upgrade15 NUMERIC, Upgrade16 NUMERIC)")
executeSQLQuery("CREATE TABLE IF NOT EXISTS carslot4 (PlayerName TEXT, Model NUMERIC, Cost NUMERIC, Paintjob NUMERIC, Color TEXT, Upgrade0 NUMERIC, Upgrade1 NUMERIC, Upgrade2 NUMERIC, Upgrade3 NUMERIC, Upgrade4 NUMERIC, Upgrade5 NUMERIC, Upgrade6 NUMERIC, Upgrade7 NUMERIC, Upgrade8 NUMERIC, Upgrade9 NUMERIC, Upgrade10 NUMERIC, Upgrade11 NUMERIC, Upgrade12 NUMERIC, Upgrade13 NUMERIC, Upgrade14 NUMERIC, Upgrade15 NUMERIC, Upgrade16 NUMERIC)")
executeSQLQuery("CREATE TABLE IF NOT EXISTS carslot5 (PlayerName TEXT, Model NUMERIC, Cost NUMERIC, Paintjob NUMERIC, Color TEXT, Upgrade0 NUMERIC, Upgrade1 NUMERIC, Upgrade2 NUMERIC, Upgrade3 NUMERIC, Upgrade4 NUMERIC, Upgrade5 NUMERIC, Upgrade6 NUMERIC, Upgrade7 NUMERIC, Upgrade8 NUMERIC, Upgrade9 NUMERIC, Upgrade10 NUMERIC, Upgrade11 NUMERIC, Upgrade12 NUMERIC, Upgrade13 NUMERIC, Upgrade14 NUMERIC, Upgrade15 NUMERIC, Upgrade16 NUMERIC)")


end

 

Edited by Gabriele01
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...