Re: Re-Importing .CSV file into Database
| From: | val petruchek | Date: | Wed, 13 Feb 2002 17:39:56 +0000 |
| Subject: | Re: Re-Importing .CSV file into Database | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-84619@lists.php.net to get a copy of this message | ||
Enum is not a function; it's a mysql data type. It's very useful when field
values are from the finite set.
Examples
CREATE table fanlist_try (ID bigint(21)
NOT NULL auto_increment, name varchar(50), email
varchar(70), age int(10), sex enum('male','female'), country
varchar(50), PRIMARY KEY (ID))
and field sex now can have only 2 values - 'male' and 'female'
the main reason to use it (instead of MySQL) is speed. The next one could be
data correctness
Valentin Petruchek (aki Zliy Pes)
*** Cut the beginning ***
http://zliypes.com.ua
mailto:val@zliypes.com.ua
----- Original Message -----
From: "Thomas Edison Jr." <thomasedisonjr@yahoo.com>
To: <petruchek@zsu.zp.ua>
Cc: <php-general@lists.php.net>
Sent: Wednesday, February 13, 2002 7:36 PM
Subject: Re: [PHP] Re-Importing .CSV file into Database
> Val,
>
> quite frankly, i'm not quite sure i know what you're
> talking about. i don't think i know enum() function!!
>
> T. Edison jr.
>
> --- val petruchek <petruchek@zsu.zp.ua> wrote:
> > > Hi Rick,
> > >
> > > Thanks for the support!
> > > This is the mySQL Table Structure :
> > >
> > > $sql = "CREATE table fanlist_try (ID bigint(21)
> > NOT
> > > NULL auto_increment, name varchar(50), email
> > > varchar(70), age int(10), sex varchar(20), country
> > > varchar(50), PRIMARY KEY (ID))";
> >
> > sex varchar(20) sounds great. why do not use
> > enum('male','female')? or sex
> > has infinite set of possible values?
> >
> >
> > Valentin Petruchek (aki Zliy Pes)
> > *** Cut the beginning ***
> > http://zliypes.com.ua
> > mailto:val@zliypes.com.ua
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
> =====
> Rahul S. Johari (Director)
> ******************************************
> Abraxas Technologies Inc.
> Homepage : http://www.abraxastech.com
> Email : abraxastech@yahoo.com
> Tel : 91-4546512/4522124
> *******************************************
>
> __________________________________________________
> Do You Yahoo!?
> Send FREE Valentine eCards with Yahoo! Greetings!
> http://greetings.yahoo.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>