How to load multiple rows in mysql
#1

Hello.
I want to get mysql data from multiple rows, for example:
I need to get all rows that contains SklypoID = 2 and then save fields to variables.

How should I do that?
I'm using https://sampforum.blast.hk/showthread.php?tid=429464 mysql plugin.
Thanks
Reply
#2

I can't work with this plugin, but I can do it with StrickenKid's plugin

Код:
new s[100];

mysql_query("SELECT * from yourTable where SklypoID = 2");
mysql_store_result();

while(mysql_fetch_row(s, " "))
{
	//here use sscanf or mysql function to get data
}
mysql_free_result();
Reply
#3

Thanks for your answer, will try when I get home
Reply
#4

Quote:
Originally Posted by ball
Посмотреть сообщение
I can't work with this plugin, but I can do it with StrickenKid's plugin

Код:
new s[100];

mysql_query("SELECT * from yourTable where SklypoID = 2");
mysql_store_result();

while(mysql_fetch_row(s, " "))
{
	//here use sscanf or mysql function to get data
}
mysql_free_result();
My plugin uses this:
Код:
sql_fetch_row(Result:result, sep[], dest[], dest_len = sizeof(dest));
How should I do it then? Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)