On 9/14/05 8:32 PM, "Vance M. Allen" <[EMAIL PROTECTED]> wrote:

> I use MySQL 4.1.7 under Fedora Core 3.
> 
> Vance
> 
> "Bob Showalter" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> Vance M. Allen wrote:
>>> I need to know how to retrieve through Perl DBI a listing of possible
>>> ENUM elements from a field for processing under a CGI script.
>> 
>> Need to know what database you're talking about. This will probably
>> involve
>> querying data dictionary views or tables. Some DBI drivers also have
>> specific methods for this kind of thing.
>> 


>From the mysql documentation here:

http://dev.mysql.com/doc/mysql/en/enum.html

"f you want to determine all possible values for an ENUM column, use SHOW
COLUMNS FROM tbl_name LIKE enum_col and parse the ENUM definition in the
second column of the output."

You can just do this from DBI and then parse the result.

Hope that gets you what you want.

Sean


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to