StrikenKid's mysql help
#1

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.
Reply
#2

Try looking at the "mysql_fetch_row" function

https://sampwiki.blast.hk/wiki/MySQL_Plugin#mysql_fetch_row
Reply
#3

Quote:
Originally Posted by Crimson
Посмотреть сообщение
Try looking at the "mysql_fetch_row" function

https://sampwiki.blast.hk/wiki/MySQL_Plugin#mysql_fetch_row
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?
Reply
#4

Using the mysql_fetch_field function, I guess.

Its not that different from G-Stylezz's
Reply
#5

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())
Reply
#6

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.
Reply
#7

try, native mysql_fetch_row_data(MySQL:handle = MySQL:0); ?
Reply
#8

Maybe mysql_fetch_row_data ?

EDIT: Same as Donya
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)