Can't insert data into Database
#2

try this.

pawn Code:
format(query, sizeof(query), "INSERT INTO \"users\" (\"username\",\"password\",\"ip\",\"score\",\"cash\",\"admin\",\"posx\",\"posy\",\"posz\",\"banned\",\"lastlogin\",\"dlic\",\"cellphone\",\"job\",\"wage\",\"bank\") VALUES ('%s','%s','%s',0,0,0,1684.3280 REAL,1444.4550 REAL,10.7708 REAL,0,%s,0,0,0,0,0)",pName(playerid),DB_Escape(buff),IP,date);
db_free_result( db_query(Users,query) );
ONLY use ' when it's a string, when it's an integer value, just put the number in it.

as for floats, put REAL behind it.

you also didn't free the result, you only did db_query;
Reply


Messages In This Thread
Can't insert data into Database - by Tayab - 31.01.2014, 16:31
Re: Can't insert data into Database - by Smileys - 31.01.2014, 16:36
Re: Can't insert data into Database - by Misiur - 31.01.2014, 16:38

Forum Jump:


Users browsing this thread: 1 Guest(s)