[MySQL] How to get the next row data?
#1

here is my code
Код:
public OnQueryFinish(query[], resultid, extraid, connectionHandle)
{
	if(resultid == CreateTask)
	{
		new result[100], result2[100];
		printf(query);
		mysql_store_result();
	 	mysql_fetch_row_format(result, " ");
	 	printf("result:%s",result);
	 	while(mysql_retrieve_row())
	 	{
	 		mysql_store_result();
			mysql_fetch_row_format(result2, " ");
	 		printf("result:%s",result2);
		}
		mysql_free_result();
	}
	return 1;
}
why i cannot get the next row data?
How should i get it?
Reply
#2

pawn Код:
mysql_store_result(); // store result once, before processing
while(mysql_fetch_row_format(result2, " ")) // Are you sure you're using a space as delimiter?
{
    printf("result: %s", result2);
}
mysql_free_result(); // free result once, after processing
Reply
#3

Quote:
Originally Posted by Vince
Посмотреть сообщение
pawn Код:
mysql_store_result(); // store result once, before processing
while(mysql_fetch_row_format(result2, " ")) // Are you sure you're using a space as delimiter?
{
    printf("result: %s", result2);
}
mysql_free_result(); // free result once, after processing
Thanks a lot!!!!!
samp mysql is pretty hard
thanks for helping!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)