Re: Getting Possible Values of an Enum Field

2001-12-21 Thread Robert Alexander
Thanks very much for sharing this, Paul. I got a couple other ideas from it, too. :> Regards, /Rob At 09:40 -0600 2001/12/21, Paul DuBois wrote: >Here's an example in Perl. >It actually gets more than the list of values, and it works for >SET columns, too. > ># Take a database connection, a

RE: Getting Possible Values of an Enum Field

2001-12-21 Thread Carsten H. Pedersen
> Am 21 Dec 2001 15:57:13 +0100 schrieb Carsten H. Pedersen: > > > > > I would like to know if there is a possibility to get all allowed > values > > > of an enum field out of the database. > > > > > > I know there are methods to get the field type and those give me back > > > something like "enu

Re: Getting Possible Values of an Enum Field

2001-12-21 Thread Paul DuBois
At 3:35 PM +0100 12/21/01, Henning Sprang wrote: >Hy there, >I would like to know if there is a possibility to get all allowed values >of an enum field out of the database. > >I know there are methods to get the field type and those give me back >something like "enum('value1', 'value2', 'value3')"

Re: Getting Possible Values of an Enum Field

2001-12-21 Thread Dibo Chen
Henning Sprang wrote: > > Am 21 Dec 2001 15:57:13 +0100 schrieb Carsten H. Pedersen: > > > > > I would like to know if there is a possibility to get all allowed > values > > > of an enum field out of the database. > > > > > > I know there are methods to get the field type and those give me back >

RE: Getting Possible Values of an Enum Field

2001-12-21 Thread Keith C. Ivey
On 21 Dec 2001, at 15:57, Carsten H. Pedersen wrote: > SELECT DISTINCT enum_col FROM tablename WHERE enum_col<256; But that's only if you have at least one record representing each possible value, right? It wouldn't work on an empty table, for example. By the way, what's the purpose of the W

RE: Getting Possible Values of an Enum Field

2001-12-21 Thread Henning Sprang
Am 21 Dec 2001 15:57:13 +0100 schrieb Carsten H. Pedersen: > > > I would like to know if there is a possibility to get all allowed values > > of an enum field out of the database. > > > > I know there are methods to get the field type and those give me back > > something like "enum('value1', 'val

RE: Getting Possible Values of an Enum Field

2001-12-21 Thread Carsten H. Pedersen
> Hy there, > I would like to know if there is a possibility to get all allowed values > of an enum field out of the database. > > I know there are methods to get the field type and those give me back > something like "enum('value1', 'value2', 'value3')", and I can parse my > possible values out