Question about boolean. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Question about boolean. (
/showthread.php?tid=535954)
Question about boolean. -
Ox1gEN - 06.09.2014
So, I have a question about booleans in MySQL R39-2.
Is it possible to fetch a boolean value from the database using cache?
I assume it is possible I'm just not sure, I haven't checked anything. I came straight here when the question appeared in my head.
Thanks for any helpers.
Re: Question about boolean. -
DaTa[X] - 06.09.2014
Test before posting ...
Possible true return 1 and false return 0
Re: Question about boolean. -
Ox1gEN - 06.09.2014
Quote:
Originally Posted by DaTa[X]
Test before posting ...
Possible true return 1 and false return 0
|
No.
I meant that is it possible to use cache for example to fetch an int in cache you use cache_get_field_content_int
so I wonder if there's anything like it just with bool at the end.
Or I'm supposed to use cache_get_field_content regularly, but I assume no cause cache_get_field_content is for strings I believe.
Re: Question about boolean. -
Ox1gEN - 07.09.2014
So I assume there isn't such thing?
I already fixed it, I used an integer instead but I still wonder if there is any.
Re: Question about boolean. -
Vince - 07.09.2014
A boolean in MySQL is an integer. If you actually store the literal string "true" or "false" then that will take more storage than just 1 or 0.