05.01.2012, 18:25
Hi guys, I have a small problem, I want to get max house id from my house table, I don't know, I tried this
but it always returns ID: 0 instead 1 'cause my max house id is 1
pawn Код:
mysql_format(1, Query, "SELECT MAX(`House ID`) FROM `pf_houses`");
mysql_query(Query);
printf("Query: %s", Query);
mysql_store_result();
if(mysql_fetch_row_format(Query, "|"))
{
mysql_fetch_field_row(string, "House ID"); h = strval(string);
printf("ID: %d", h);
}
mysql_free_result();