MySQL fetching a boolean value
#1

Hey all! I tried to find a function for fetching a boolean value from a cache and I haven't found a solution yet.
I'm using the latest MySQL plugin from BlueG and I've only found functions for getting an integer and float values and strings. (cache_get_field_content and other functions)
Can someone tell a proper way to do this? Thank you!
Reply
#2

Probaj ovo...(Try this...)

pawn Code:
new bool:test;
test =!!cache_get_field_content_int(0, "test");
OR

pawn Code:
new bool:test;

if(cache_get_field_content_int(0, "test")) test = true;
else test = false;
Reply
#3

Alright, thanks for the answer!
I should read other posts where people asked the same question, and Vince told the answer on one of the threads so here's the solution:
pawn Code:
PlayerInfo[playerid][pShoot] = bool:cache_get_field_content_int(0, "ShootInd", mysql);
Reply
#4

No problem, glad you fixed your issue
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)