SQL problem[ edited post ] - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SQL problem[ edited post ] (
/showthread.php?tid=328560)
solved! -
Rock1 - 25.03.2012
Solved!
I was stupid, it was simple to do it.
Re: SQL problem[ edited post ] -
fordawinzz - 25.03.2012
pawn Код:
format( r_Query, sizeof( r_Query ), "SELECT * FROM `Points` WHERE `Nume` = '%s'", GetName( playerid ));
Rezultat = db_query( DriftPoints, r_Query );
Re: SQL problem[ edited post ] -
Edvin - 25.03.2012
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 ...
Re: SQL problem[ edited post ] -
Rock1 - 25.03.2012
Nope, still same thing..
Re: SQL problem[ edited post ] -
Edvin - 25.03.2012
And where you insert into the database?
Re: SQL problem[ edited post ] -
Rock1 - 25.03.2012
solved, thanks anyway.