SQLite - Create multiple tables in db
#1

Hi all ^^

I created a gamemode from scratch with sqlite registration system and everything works great. Everything works perfectly using a single table in the database, but when I add more to an error. No edit/create the second table. I add the related code:

If I use only this, it works correctly.

pawn Code:
new string[256];
            format(string, sizeof(string), "INSERT INTO `CUENTAS` (`NOMBRE`, `PASSWORD`, `ACCESLEVEL`, `ESTADO`, `IP`) VALUES ('%s','%s','%i','%i','%s')", DB_Escape(NombrePersonaje(playerid)), (inputtext), ACCESLEVEL_DEFAULT, ESTADO_ONLINE, DB_Escape(DireccionIP(playerid)));
            db_free_result(db_query(Sqlite, string));
The error what I have to add the second table; no work :S

pawn Code:
new string[256];
            format(string, sizeof(string), "INSERT INTO `CUENTAS` (`NOMBRE`, `PASSWORD`, `ACCESLEVEL`, `ESTADO`, `IP`) VALUES ('%s','%s','%i','%i','%s')", DB_Escape(NombrePersonaje(playerid)), (inputtext), ACCESLEVEL_DEFAULT, ESTADO_ONLINE, DB_Escape(DireccionIP(playerid)));
            format(string, sizeof(string), "INSERT INTO `PERSONAJES` (`NOMBRE`, `PUNTOS`, `KARMA`, `POSX`, `POSY`, `POSZ, `SKIN``) VALUES ('%s','0','0','0','0','0','0')", DB_Escape(NombrePersonaje(playerid)));
            db_free_result(db_query(Sqlite, string));
Any suggestions? Thanks ^^

PS: I have no permission to post in the appropriate section of support, sorry :S
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)