Sorry I made a mistake.
The first value is 1.
'' = 0
:)
Wouter
"Wouter" <no******************@djwice.com> wrote in message
news:cm**********@news.tudelft.nl...
: Well..
:
: In MySQL you can have more logical.
:
: For an Multiplpe choise exam:
: ENUM('A','B','C','D')
: or for en enquette:
: ENUM('Yes','No','no opinion')
:
: The first option has logical value 0, the second logical value 1.
: The 3rd option has logical value 2, the 4th option logical value 3.
:
: It's not that hard..
:
: It's even handy in some situations.
: I normally use:
:
: file_online: 'no','yes','not tested'
:
: with the default value to 'not tested'
:
:
: In MySQL you can access the value like a logical.
: But the result will give you one of the values of the ENUM definition.
:
:
: I think it's more readble that way than just using 0 and 1 or true and
: false.
: Vist
http://dev.mysql.com/doc/mysql/en/ENUM.html
: if it's not yet clear to you.
:
:
: Wouter
:
:
: "Charles Crume" <cc@charlescrumesoftware.com> wrote in message
: news:yq*******************@fe2.columbus.rr.com...
:: Hi;
::
:: Thanks for the reply, but I have no idea what you are talking about.
: Logical
:: field can nont have first, second, third, and fourth entries (AFAIK).
::
:: Charles...
::
::
:: "Wouter" <no******************@djwice.com> wrote in message
:: news:cm**********@news.tudelft.nl...
:: > You can try
:: >
:: > SELECT (new AND 1) as show FROM yourdatabase
:: >
:: > If I'm correct
:: >
:: > 0 = first entry
:: > 1 = second entry
:: > 2 = 3rd entry
:: > 3 = 4th entry
:: > ..
:: >
:: >
:: > If you use SET you can have multiple selected:
:: >
:: > 0 = none selected
:: > 1 = first item selected
:: > 2 =second item selected
:: > 3 = first & second item selected
:: > 4 = 3th item selected
:: > 5 = 1st + 3rd ..
:: > 6 = 2nd + 3rd
:: > 7 = 1st+2nd+3rd .
:: >
:: > ...
:: >
:: > Maybe this helps.
:: >
:: > or you can try:
:: >
:: > SELECT (new="New") as show FROM yourdatabase
:: >
:: >
:: > show==0 if not equal
:: > show==1 if equal
:: >
:: > :) Hope this helps a bit
:: > Wouter
:: >
:: >
:: >
:: > "Charles Crume" <cc@charlescrumesoftware.com> wrote in message
:: > news:Ui*******************@fe2.columbus.rr.com...
:: > : Hello all;
:: > :
:: > : I have used dBASE, and other computer languages/databases, for years.
:: They
:: > : all have a logical field type. However, the version of MySQL used by
: the
:: > ISP
:: > : hosting my site does not support a "logical" field type.
:: > :
:: > : It does support ENUM and I have set some up in a couple of tables
that
:: > : accept the values 'T' and 'F'. Sometimes they work like a logical
: field:
:: > :
:: > : if ($myrow['new']) echo 'New';
:: > : else echo 'NOT new';
:: > :
:: > : and other times I must use:
:: > :
:: > : if ($myrow['new'] == 'T') echo 'New';
:: > : else echo 'NOT New';
:: > :
:: > : I've been searching google and have only come up with some basic
: info --
:: > : such as use ENUM that allow '0' and '1'.
:: > :
:: > : Before, I go off changing everything, can someone provide some
insight
:: in
:: > : using ENUM fields as logical and/or point me to a few good
: articles/web
:: > : pages?
:: > :
:: > : TIA.
:: > :
:: > : Charles...
:: > :
:: > :
:: > :
:: > :
:: > : ---
:: > : Outgoing mail is certified Virus Free.
:: > : Checked by AVG anti-virus system (
http://www.grisoft.com).
:: > : Version: 6.0.786 / Virus Database: 532 - Release Date: 10/29/04
:: > :
:: > :
:: >
:: >
::
::
:: ---
:: Outgoing mail is certified Virus Free.
:: Checked by AVG anti-virus system (
http://www.grisoft.com).
:: Version: 6.0.786 / Virus Database: 532 - Release Date: 10/29/04
::
::
:
: