18.03.2015, 13:46
Included in a_mysql:
Example:
Cache_get_*_int/float probably automagically convert null to 0, so if you have nullable field with distinct reason for null usage, use the former version.
Quote:
#define ismysqlnull(%0) (strcmp(%0,"NULL",false)==0) |
pawn Код:
new
probablyNullField[64]
;
cache_get_row(0, 0, probablyNullField, 1, 64);
if(ismysqlnull(probablyNullField)) {
print("Oh my, that field was null!");
} else {
printf("That field wasn't null, and its contents are: %s", probablyNullField);
}