How can i search in db after a player? - 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: How can i search in db after a player? (
/showthread.php?tid=547304)
How can i search in db after a player? -
Metharon - 22.11.2014
i tried this :
Код:
if(sBizz[IDSB][sBOwnable] == 1)
{
format( szQuery, 500, "SELECT * FROM `Accounts` WHERE `Name` = '%e' LIMIT 1;", sBizz[IDSB][sBDetinator] );
new Cache: result2 = mysql_query( SQL, szQuery );
new Get[ 2 ];
cache_get_data( Get[ 0 ], Get[ 1 ], SQL );
if( !Get[ 0 ] )
{
sBizz[IDSB][sBOwnable] = 0;
format( sBizz[IDSB][sBDetinator], 50, "No-One");
}
}
But i get errors no active catche or invalid data type row or something like these...
The full script :
http://pastebin.com/92AAb9m4
I want:
- To check in 'Accounts' if a player name [sBDetinator] exist , if no , to reset the sbusiness.
Re: How can i search in db after a player? -
Raweresh - 22.11.2014
Function
mysql_query can't use specifier
%e. Try to change it to
%s.