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 of this with
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 of this
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', 'value2',
On 21 Dec 2001, at 15:57, Carsten H. Pedersen wrote:
SELECT DISTINCT enum_col FROM tablename WHERE enum_col256;
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
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
something like
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'), and I
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 table