StrikenKid's mysql help - 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: StrikenKid's mysql help (
/showthread.php?tid=255931)
StrikenKid's mysql help -
lolumadd_ - 18.05.2011
On G-Stylez plugin he has a
Код:
mysql_retrieve_row()
function. What is the equivalent function on his (Stricken Kid's) plugin? I need to use it because I have a /searchbans and I need it to keep sending data and not stopping after the first result.
this is how my code looks like:
Код:
query(query);
while(mysql_retrieve_row())
{
//print data
}
how can i use that same functionality as while(mysql_retrive_row) in striken kid's plugin?
Thanks.
Re: StrikenKid's mysql help -
Crimson - 18.05.2011
Try looking at the "mysql_fetch_row" function
https://sampwiki.blast.hk/wiki/MySQL_Plugin#mysql_fetch_row
Re: StrikenKid's mysql help -
lolumadd_ - 18.05.2011
Quote:
Originally Posted by Crimson
|
I have a lot of data in that table and I don't want to use sscanf or split all of that data just to get some values. Ain't there a simpler way?
Re: StrikenKid's mysql help -
Crimson - 18.05.2011
Using the mysql_fetch_field function, I guess.
Its not that different from G-Stylezz's
Re: StrikenKid's mysql help -
lolumadd_ - 18.05.2011
I know, but..well anyways, I solved it. For anyone else who thinks the same as me:
Код:
//query here
new var=mysql_num_rows(), idx;
while(idx < var)
{
//mysql_fetch_field / mysql_get_field
idx++;
}
Will work the same as while(mysql_retrieve_row())
Re: StrikenKid's mysql help -
lolumadd_ - 18.05.2011
Quote:
Originally Posted by lolumadd_
I know, but..well anyways, I solved it. For anyone else who thinks the same as me:
Код:
//query here
new var=mysql_num_rows(), idx;
while(idx < var)
{
//mysql_fetch_field / mysql_get_field
idx++;
}
Will work the same as while(mysql_retrieve_row())
|
Nevermind, that just repeats the same value over and over again, but doesn't go to the next row lol. Still need help please.
Re: StrikenKid's mysql help -
Donya - 18.05.2011
try, native mysql_fetch_row_data(MySQL:handle = MySQL:0); ?
Re: StrikenKid's mysql help -
MadeMan - 19.05.2011
Maybe mysql_fetch_row_data ?
EDIT: Same as Donya