You are here: Re: PHP, MySQL and BIT field « PHP Programming Language « IT news, forums, messages
Re: PHP, MySQL and BIT field

Posted by Jeff North on 12/16/30 11:58

On Mon, 18 Sep 2006 15:42:55 +0200, in comp.lang.php "Vojta"
<ryvo@centrum.cz>
<eem7p4$24u1$1@ns.felk.cvut.cz> 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
>|

The value is either 0000 or 0001 - not to be confused with ascii(0) or
ascii(1).
---------------------------------------------------------------
jnorthau@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация