SQLite won't insert into
#1

PHP Code:
format(sqlquerysizeof(sqlquery), "INSERT INTO `players` (`Name`, `Password`, `Salt`, `Pol`, `Godine`, `Email`) VALUES ('%s', '%s', '%s', %d, %d)"
                
DB_Escape(E_PLAYER_INFO[playerid][E_PLAYER_NAME]), 
                
DB_Escape(E_PLAYER_INFO[playerid][E_PLAYER_PASSWORD]), 
                
DB_Escape(E_PLAYER_INFO[playerid][E_PLAYER_SALT]), 
                
E_PLAYER_INFO[playerid][E_PLAYER_GENDER], 
                
E_PLAYER_INFO[playerid][E_PLAYER_AGE]);
            
            
db_query(Databasesqlquery);
print(
sqlquery); 
It won't Insert data into database
.
//print(sqlquery); this outputs
PHP Code:
INSERT INTO `players` (`Name`, `Password`, `Salt`, `Pol`, `Godine`, `Email`) VALUES ('Stefa_Kuja''F8FAE6659CF55CFDF7E3FEA6A3DC12C4E488F102725FC16990A57657CED954A7'')ufaKWYP?[tz.0YU'118
Reply
#2

Try chaning this
pawn Code:
VALUES ('%s', '%s', '%s', %d, %d) // TO

VALUES ('%s', '%s', '%s', '%d', '%d')
EDIT: Also I don't know much about SQLite but does it have logs if so can u send them
Reply
#3

if you can give us log errors next time (Main File > Logs > Errors)

anyway for this one there is one missing in your format!

(`Name`, `Password`, `Salt`, `Pol`, `Godine`, `Email`)
('%s', '%s', '%s', %d, %d)

you dident specife any detecter for Email Value!
remove it or make it like this !
('%s', '%s', '%s', %d, %d,'%s')
and add playeremail at end of format
Reply
#4

Quote:
Originally Posted by IdonTmiss
View Post
Try chaning this
pawn Code:
VALUES ('%s', '%s', '%s', %d, %d) // TO

VALUES ('%s', '%s', '%s', '%d', '%d')
EDIT: Also I don't know much about SQLite but does it have logs if so can u send them
Quote:
Originally Posted by khRamin78
View Post
if you can give us log errors next time (Main File > Logs > Errors)

anyway for this one there is one missing in your format!

(`Name`, `Password`, `Salt`, `Pol`, `Godine`, `Email`)
('%s', '%s', '%s', %d, %d)

you dident specife any detecter for Email Value!
remove it or make it like this !
('%s', '%s', '%s', %d, %d,'%s')
and add playeremail at end of format
I just have removed Email so it now looks like this
PHP Code:
format(sqlquerysizeof(sqlquery), "INSERT INTO `players` (`Name`, `Password`, `Salt`, `Pol`, `Godine`) VALUES ('%s', '%s', '%s', %d, %d)"
                
DB_Escape(E_PLAYER_INFO[playerid][E_PLAYER_NAME]), 
                
DB_Escape(E_PLAYER_INFO[playerid][E_PLAYER_PASSWORD]), 
                
DB_Escape(E_PLAYER_INFO[playerid][E_PLAYER_SALT]), 
                
E_PLAYER_INFO[playerid][E_PLAYER_GENDER], 
                
E_PLAYER_INFO[playerid][E_PLAYER_AGE]);
            
            
db_query(Databasesqlquery); 
It didn't give me any error in logs > errors. It is blank. Do I Need to put any function after db query?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)