07.07.2012, 22:14
Hi dear,
i've converted my script from strickenkids-mysql plugin to BlueG's ones. But now, a small system will not work, which uses "mysql_fetch_row_data". I tried it with "mysql_retrieve_row", but it only works for exactly three times (not more, with the mysql-plugin from strickenkid it works fine).
Example:
[pwn]
format(querystring,sizeof(querystring),"SELECT * FROM `infodatabase` WHERE id LIKE '%s' OR info1 LIKE '%%%s%%%' OR info2 LIKE '%%%s%%%' OR info3 LIKE '%%%s%%%' OR info4 '%%%s%%%' LIMIT 1", infonumb,info1,info1,info1,info1);
mysql_query(querystring, -1,-1,sqlconnection);
printf("2: %s",querystring);
mysql_store_result(sqlconnection);
mysql_retrieve_row(sqlconnection);
mysql_fetch_field_row(string, "infomsg");
mysql_free_result(sqlconnection);
[/pwn]
Before i've converted to BlueG's MySQL Plugin (from Strickenkids), it stands exactly like that:
[pwn] format(querystring,sizeof(querystring),"SELECT * FROM `infodatabase` WHERE id LIKE '%s' OR info1 LIKE '%%%s%%%' OR info2 LIKE '%%%s%%%' OR info3 LIKE '%%%s%%%' OR info4 '%%%s%%%' LIMIT 1", infonumb,info1,info1,info1,info1);
mysql_query(querystring);
mysql_store_result();
mysql_fetch_row_data();
mysql_fetch_field("infomsg",string);
mysql_free_result();[/pwn]
Do I use the wrong function?
Whats wrong?
Thanks for help.
i've converted my script from strickenkids-mysql plugin to BlueG's ones. But now, a small system will not work, which uses "mysql_fetch_row_data". I tried it with "mysql_retrieve_row", but it only works for exactly three times (not more, with the mysql-plugin from strickenkid it works fine).
Example:
[pwn]
format(querystring,sizeof(querystring),"SELECT * FROM `infodatabase` WHERE id LIKE '%s' OR info1 LIKE '%%%s%%%' OR info2 LIKE '%%%s%%%' OR info3 LIKE '%%%s%%%' OR info4 '%%%s%%%' LIMIT 1", infonumb,info1,info1,info1,info1);
mysql_query(querystring, -1,-1,sqlconnection);
printf("2: %s",querystring);
mysql_store_result(sqlconnection);
mysql_retrieve_row(sqlconnection);
mysql_fetch_field_row(string, "infomsg");
mysql_free_result(sqlconnection);
[/pwn]
Before i've converted to BlueG's MySQL Plugin (from Strickenkids), it stands exactly like that:
[pwn] format(querystring,sizeof(querystring),"SELECT * FROM `infodatabase` WHERE id LIKE '%s' OR info1 LIKE '%%%s%%%' OR info2 LIKE '%%%s%%%' OR info3 LIKE '%%%s%%%' OR info4 '%%%s%%%' LIMIT 1", infonumb,info1,info1,info1,info1);
mysql_query(querystring);
mysql_store_result();
mysql_fetch_row_data();
mysql_fetch_field("infomsg",string);
mysql_free_result();[/pwn]
Do I use the wrong function?
Whats wrong?
Thanks for help.