27.07.2012, 16:30
After executing your SELECT query and storing the result, you need to do a check to see if there were any results, which can be done as follows:
I believe trying to fetch a field of nil result is the reason for your mysql crash.
pawn Код:
mysql_query(yourquerystring);
mysql_store_result();
if(mysql_num_rows())
{
// wahey, resultttt! fetch field(s) now or w/e!
}else{
// no results found :-(
}