SQLite not writing to database
#3

Is the Query big enough?
Is every field's name written correctly?

The disadvantage SQLite has is that you don't know if an error occurs while executing a query. The only way to figure it out is doing:

pawn Код:
format(Query, sizeof(Query), "INSERT INTO `ACCOUNTS` (`NAME`, `PASSWORD`, `IP`, `LEVEL`, `CASH`, `ADMINLEVEL`, `HOURS`, `JOB`, `BANNED`, `SPAWN`, `BANK`, `FOOD`, `WATER`, `SKIN`, `FACTION`, `FACTION LEVEL`) VALUES('%s','%s','%s', '1', '2000', '0', '0', '0', '0', '0', '0', '432000', '432000', '2', '0', '0')", DB_Escape(name), DB_Escape(inputtext), DB_Escape(ip));
db_query(survival, Query);
print(Query);
So if the message is not the whole, make the size bigger. If the lenght is fine then use SQLite Database Browser and open your database. Go and execute the query was printed before (if its lenght is fine) and if there are any errors in the fields or something like that, it will write it down.
Reply


Messages In This Thread
SQLite not writing to database - by Mattakil - 29.09.2013, 21:09
Re: SQLite not writing to database - by Jefff - 29.09.2013, 21:14
Re: SQLite not writing to database - by Konstantinos - 29.09.2013, 21:16
Re: SQLite not writing to database - by Mattakil - 29.09.2013, 21:28
Re: SQLite not writing to database - by Mattakil - 29.09.2013, 21:39
Re: SQLite not writing to database - by Jefff - 29.09.2013, 22:07
Re: SQLite not writing to database - by Mattakil - 29.09.2013, 22:13

Forum Jump:


Users browsing this thread: 1 Guest(s)