Anubhav Posted September 28, 2014 Share Posted September 28, 2014 executeSQLQuery("SELECT * FROM BoDGroupTurf WHERE Group=?", playerGang) Whats wrong with this? It says Database Query Failed: near "Group":syntax error Link to comment
Mr_Moose Posted September 28, 2014 Share Posted September 28, 2014 It's obviously a syntax error, SQL queries are case sensitive so it could be as simple as a misspelled word. You may find some more help in it's documentation, https://wiki.multitheftauto.com/wiki/ExecuteSQLQuery Link to comment
Anubhav Posted September 28, 2014 Author Share Posted September 28, 2014 No nothing's wrong in spelling. EDIT: If you want proof: executeSQLQuery("CREATE TABLE IF NOT EXISTS BoDGroupTurf ( Group TEXT, Count INT )") This Is Where i create table Link to comment
Anubhav Posted September 28, 2014 Author Share Posted September 28, 2014 I realy need help this is urgent very urgent! Link to comment
#DRAGON!FIRE Posted September 28, 2014 Share Posted September 28, 2014 executeSQLQuery( "SELECT * FROM BoDGroupTurf WHERE Group=?", playerGang ) Link to comment
Anubhav Posted September 28, 2014 Author Share Posted September 28, 2014 Found one more error: executeSQLQuery("CREATE TABLE IF NOT EXISTS BoDGroupTurf ( Group TEXT, Count INT)") Same as I told. Whats going wrong/ EDIT: By using db functions this works fine. Link to comment
#DRAGON!FIRE Posted September 28, 2014 Share Posted September 28, 2014 executeSQLQuery( "CREATE TABLE IF NOT EXISTS BoDGroupTurf ( Group, Count )" ) Link to comment
Saml1er Posted September 29, 2014 Share Posted September 29, 2014 Its SQL, you might've screwed up the table so simply drop this table and create a new one. Link to comment
Anubhav Posted September 29, 2014 Author Share Posted September 29, 2014 I'm just using another method tables for this thing. Its realy hard with SQL... Link to comment
Saml1er Posted September 29, 2014 Share Posted September 29, 2014 I'm just using another method tables for this thing. Its realy hard with SQL... SQLite is very easy to use. I also had this kind of problem. So I just changed table name and everything was fixed. : ) Link to comment
Mr_Moose Posted September 29, 2014 Share Posted September 29, 2014 The keywords 'Group' and 'Count' may be reserved, have you tried giving them another name, just pick something random. Link to comment
Anubhav Posted September 29, 2014 Author Share Posted September 29, 2014 Now its not needed I solved the problem without using this SQL. 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