30.10.2018, 07:22
There you go, if it exists, it'll return the value 1 which is true, else 0 which is false.
pawn Код:
CMD:alter(playerid, params[])
{
new query[128];
mysql_format(Database, query, sizeof(query), "SHOW COLUMNS FROM `sa-mp_test` LIKE 'column1'");
mysql_tquery(Database, query, "ColumnCheck");
return 1;
}
forward ColumnCheck();
public ColumnCheck()
{
printf("It returned the value %d", cache_num_rows());
return 1;
}