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

Posted by Vojta on 09/19/06 09:19

Hello Iulian, thank you for your reply.

!is_null($registered) is allways evaluated as TRUE

Vojta

"iulian.ilea" <iulian.ilea@gmail.com> pνse v diskusnνm prνspevku
news:1158588261.314245.233520@i3g2000cwc.googlegroups.com...
>
> 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]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° 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

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация