Mysql Bool
#1

Hello, sorry for bad english but i whant some help, how to load bool veriables?

hear is mine script, its allways set it in true

pawn Код:
if( mysql_fetch_field_row( fetch, "Telas" ) )       playerDB[ playerid ][ turitel ] = true;
Reply
#2

Bool is stored as tinyint in database (0/1, not false/true)

pawn Код:
mysql_fetch_field_row( fetch, "Telas");
playerDB[ playerid ][ turitel ] = !!strval(fetch);
!! is neat trick to change any variable into boolean

#e: pardon
Reply
#3

Thx, it's working
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)