SQL problem[ edited post ]
#1

Solved!

I was stupid, it was simple to do it.
Reply
#2

pawn Код:
format( r_Query, sizeof( r_Query ), "SELECT * FROM `Points` WHERE `Nume` = '%s'", GetName( playerid ));
Rezultat = db_query( DriftPoints, r_Query );
Reply
#3

Where you insert in the database? ) I don't see syntax "INSERT INTO" anywhere )

Change this codes:
Код:
format( r_Query, sizeof( r_Query ), "SELECT `DriftScore` FROM `Points` WHERE `Nume` = '%s'", GetName( playerid ) );
Rezultat = db_query( DriftPoints, r_Query );
//--------------------------------------------------------------------------------------
db_query( DriftPoints, "CREATE TABLE IF NOT EXISTS `Points` (`Nume`, `DriftScore`)" ); //Why you free the result if you don't have one?
//--------------------------------------------------------------------------------------
format( _Query, sizeof( _Query ), "UPDATE `Points` SET `DriftScore` = `%d` WHERE `Nume` = '%s'", value, GetName( playerid ) );
db_query( DriftPoints, _Query );
Now it shout work ...
Reply
#4

Nope, still same thing..
Reply
#5

And where you insert into the database?
Reply
#6

solved, thanks anyway.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)