10.09.2016, 08:48
@eco1999: https://sampforum.blast.hk/showthread.php?pid=3765459#pid3765459
If the value of the specified column is NULL will be returned as 0 or any other number you set it to.
You can also check in the script before retrieving its value if it is null with cache_is_value_null and set a default value. If it is not, then retrieving it with cache_is_value_int but I find the first method way better.
https://github.com/pBlueG/SA-MP-MySQL#faq
Quote:
Is there a query I can make that'd turn NULL to 0 so I wouldn't have to grab the data as string and strval it to avoid the warning it drops in my mysql log? Sadly I'm really annoyed by such warnings that floods the log.
|
pawn Код:
"SELECT ..., IFNULL(column, 0), ..."
You can also check in the script before retrieving its value if it is null with cache_is_value_null and set a default value. If it is not, then retrieving it with cache_is_value_int but I find the first method way better.
Quote:
Код:
[08:32:41] Loading plugin: mysql.so [08:32:41] Failed (libmysqlclient.so.18: cannot open shared object file: No such file or directory) |