29.05.2016, 10:12
PHP код:
forward OnCheckTagType(TagName[]);
stock MySQLCheckTag( TagName[] ) {
new iQuery[128];
mysql_format(iQuery, sizeof(iQuery), "SELECT `ID` FROM `Clans` WHERE `ClanTAG` = '%e'", TagName);
mysql_tquery(handle, iQuery, "OnCheckTagType", "s", TagName);
}
public OnCheckTagType(TagName[]) {
new rows, fields;
cache_get_data(rows, fields, handle);
if(rows) {
new strid[5], intid;
cache_get_field_content(0, "ID", strid, handle); intid = strval(strid);
} else {
return 0;
}
return 1;
}