|
Posted by iulian.ilea on 10/24/61 11:58
Vojta wrote:
> Please can somebody give me an advice?
>
> my MySQL table contains bit field
>
> Registered BIT(1) NOT NULL DEFAULT 0
>
> I read records using
>
> $result = mysql_query('SELECT * FROM MyUsers');
> $row = mysql_fetch_array($result, MYSQL_ASSOC);
> $registered = $row['Registered'];
>
> Command "echo $registered;" shows nothing or rectangles depending on the
> value, it's ok. But I do not know how to use it in IF statements or so.
> Whatever I try does not work. How can I work with such values in PHP?
>
> Thank you in advance! Vojta
I'm not sure if this works, but have you tryed if
(!is_null($registered)) {} ?
Navigation:
[Reply to this message]
|