mysq | What's the problem ? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: mysq | What's the problem ? (
/showthread.php?tid=263588)
mysq | What's the problem ? -
EviLpRo - 22.06.2011
hello.
what it's problem in this code:
pawn Код:
stock GetServerInt(var[])
{
new query[256],vreturn[56];
format(query,256,"SELECT '%s' FROM 'server' WHERE Checked=50",var);
mysql_query(query);
mysql_store_result();
mysql_fetch_row_format(vreturn,"|");
return strval(vreturn);
}
It does not return the correct value.
please help !!
Re: mysq | What's the problem ? -
Donya - 22.06.2011
first off, 'server'?
secondly, you are selecting the row in | format so the real return will look like
Var|Var|Var|Var
then you are returning strval("Var|Var|Var|Var");
you get where im going?
Re: mysq | What's the problem ? -
EviLpRo - 22.06.2011
Sorry man but I did not understand that.
You can try to explain more in detail?
Or just bring me Revised Code and from the solution I would realize. ?
Re: mysq | What's the problem ? -
gabitzu4ever - 22.06.2011
pawn Код:
stock GetServerInt(var[])
{
new query[256],vreturn[56];
format(query,256,"SELECT FROM 'server' WHERE `name` = '%s');
mysql_query(query);
mysql_store_result();
mysql_fetch_row_format(vreturn,"|");
return strval(vreturn);
}
?