Ryan2233 Posted February 27, 2018 Share Posted February 27, 2018 As title says. Query is: CREATE TABLE `housingdata`(`name`, `address`, `type`, `interior`, `intlock`, `owner`, `price`, `value`, `income`, `status`, `x`, `y`, `z`, `csX`, `csY`, `csZ`, `csrX`, `csrY`, `csrZ`) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", name , address , typeint , intint , "0" , "SAHousing" , tonumber(price) , tonumber(price) , tonumber(income) , tonumber(status) , tonumber(x) , tonumber(y) , tonumber(z) , tonumber(csx) , tonumber(csy) , tonumber(csz) , tonumber(csrx) , tonumber(csry) , tonumber(csrz) Thanks Error is database query failed near: VALUES syntax error Link to comment
NeXuS™ Posted February 27, 2018 Share Posted February 27, 2018 executeSQLQuery("CREATE TABLE IF NOT EXISTS `housingdata` (name VARCHAR(255), address VARCHAR(255), type INT, interior INT, intlock INT, owner INT, price INT, value INT, income INT, status INT, x FLOAT(11), y FLOAT(11), z FLOAT(11), csX FLOAT(11), csY FLOAT(11), csZ FLOAT(11), csrX FLOAT(11), csrY FLOAT(11), csrZ FLOAT(11))") Link to comment
Ryan2233 Posted February 27, 2018 Author Share Posted February 27, 2018 32 minutes ago, NeXuS™ said: executeSQLQuery("CREATE TABLE IF NOT EXISTS `housingdata` (name VARCHAR(255), address VARCHAR(255), type INT, interior INT, intlock INT, owner INT, price INT, value INT, income INT, status INT, x FLOAT(11), y FLOAT(11), z FLOAT(11), csX FLOAT(11), csY FLOAT(11), csZ FLOAT(11), csrX FLOAT(11), csrY FLOAT(11), csrZ FLOAT(11))") ?? Link to comment
NeXuS™ Posted February 27, 2018 Share Posted February 27, 2018 You can use this in a script, and it'll create the table. Link to comment
Ryan2233 Posted February 27, 2018 Author Share Posted February 27, 2018 (edited) 22 minutes ago, NeXuS™ said: You can use this in a script, and it'll create the table. Alright 22 minutes ago, NeXuS™ said: You can use this in a script, and it'll create the table. I then get the error "Database quera failed: no such column: id. Any ideas? Edited February 27, 2018 by Ryan2233 Link to comment
Ryan2233 Posted March 2, 2018 Author Share Posted March 2, 2018 3 hours ago, NeXuS™ said: Then add an "id" column. I did but I still get an error that it's missing. And in the SQLitebrowser the ID column doesn't show. Link to comment
Fabioxps Posted March 2, 2018 Share Posted March 2, 2018 shut down the server and delete the registry.db file in the deathmatch folder Link to comment
NeXuS™ Posted March 2, 2018 Share Posted March 2, 2018 Are you trying to add the "id" column via script? In that case, you don't have to shut down the server, and you don't have to delete registry.db. Link to comment
Ryan2233 Posted March 2, 2018 Author Share Posted March 2, 2018 2 hours ago, NeXuS™ said: Are you trying to add the "id" column via script? In that case, you don't have to shut down the server, and you don't have to delete registry.db. I try to add it using the both alter table and via the script. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now