Re: getting the options in a mysql enum

From: Date: Wed, 26 Jul 2000 15:29:32 +0000
Subject: Re: getting the options in a mysql enum
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-1523@lists.php.net to get a copy of this message
This query; $description = mysql_query("DESCRIBE boat_lines type;"); echo (mysql_result($description, 0)); just returns the name of the column, which in this case is type. I tried changing 0 to 1 but there is no row 1. When I make the same query in the mysql console, I get the correct description of the column. Any other suggestions? "Chris Adams" wrote in message <01a201bff6a2$56fcdbd0$0a65a8c0@digitaria.com>... >> Is there any way I can get a list of the possible values in a mysql ENUM >> column? > >$description = mysql_query("DESCRIBE [Database.]Table Column"); > >echo mysql_result($description, 0); > >Note that this is the raw description, so you'll need to do a little >parsing. > > > > >-- >PHP Database Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net >For additional commands, e-mail: php-db-help@lists.php.net >To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.db (#1523) next »