03.12.2013, 17:07
What version are you using? I believe you are using MySQL r6 below there's another way to load it but it doesn't use sscanf
pawn Код:
new
string [ 70 ]; // variable
mysql_store_result(); // store the sql result
if(mysql_num_rows() != 0) // row checking
{ // opening bracket
while(mysql_fetch_row_format(Query, "|")) //loop and divider
{ // opening bracket
mysql_fetch_field_row(string, "row0"); var1 = strval(string); //load row 1
mysql_fetch_field_row(string, "row1"); var2 = strval(string); // load row 2
mysql_fetch_field_row(string, "row2"); var3 = strval(string); // load row 3
} // closing bracket
mysql_free_result(); // free the result
} // closing bracket
else // else statement
{
//code
}