03.04.2014, 21:58
How would i set iRows (in stock MySQL_NameExists) to the value that is being returned in NameExistsCheck?
Код:
stock MySQL_NameExists(const account[])
{
new
szQuery[128],
iRows = 0;
mysql_tquery(MySQL, "SELECT * FROM `accounts` WHERE `Name` = 'Bryan'", "NameExistsCheck()", "", "");
//Set iRows to rows in NameExistsCheck()
printf("Rows for name exists: '%d'", iRows);
return iRows;
}
forward NameExistsCheck();
public NameExistsCheck()
{
new rows = cache_get_row_count();
printf("Rows for name exists2: '%d'", rows);
if(rows >= 1) {
rows = 1;
}
else {
rows = 0;
}
return rows;
}

