I got a problem and I can't find the error. It doesnt let me update my index and always says SQL error or missing data type near WHERE syntax. Everything else works. So I thought you guys could have a look at this:
Create Table: execute("CREATE TABLE Players (player TEXT, money DOUBLE, job TEXT, level INTEGER, exp DOUBLE)"); Works
Insert: DATABASE.execute("INSERT INTO Players VALUES ('" + player + "', " + money + ", '" + job.getJob() + "', " + job.getLevel() + ", " + job.getEXP() + ")"); Works
Update: DATABASE.execute("UPDATE Players WHERE player = '" + player.toLowerCase() + "' SET money = " + money + ", job = '" + job.getJob() + "', level = " + job.getLevel() + ", exp = " + job.getEXP()); Doesnt work
I am using the following values to Update:
player = gemaken
money = 100.0
job.getJob() = miner
level = 0
exp = 0.0
Thanks in advance!
Sincerely, Gemaken