20.06.2010, 10:59
pawn Код:
//some query
mysql_store_result();
if(mysql_retrieve_row()) //there are actually any rows
{
mysql_get_field("fieldname",wheretostorevalue); //macro for mysql_fetch_field_row
mysql_get_field(...);
mysql_get_field(...);
mysql_get_field(...);
mysql_get_field(...);
}
else //there aren't
{
}
mysql_free_result();
pawn Код:
//some query
mysql_store_result();
while(mysql_retrieve_row()) //it will be running until there are no more rows to be retrieved
{
mysql_get_field("fieldname",wheretostorevalue); //macro for mysql_fetch_field_row
mysql_get_field(...);
mysql_get_field(...);
mysql_get_field(...);
mysql_get_field(...);
}
mysql_free_result();