-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
* and then Jason Wong declared.... > Not sure whether there is a built-in function for doing so. But here's > something I prepared earlier: > > function create_list_from_ENUM($dbh, $table, $column) { > $sth = $dbh->prepare("SHOW COLUMNS FROM $table LIKE '$column'"); > if ($sth) { > $sth->execute(); > while ($row = $sth->fetchrow_hash()) { > ereg("('(.*)')", $row[1], $temp); > $array = explode( "','", $temp[2] ); > while (list ($key, $val) = each ($array)) { > $return[] = "$val"; > } > } > } > return $return; > } Yep, It's come back to me now. Your right of course there is no php function for this, it's the 'show columns' sql that does the trick. Cheers! - -- - ----------------------------------------------------------- www.explodingnet.com | Projects, Forums and + Articles for website owners - -- Nick Wilson -- | and designers. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8eT6kHpvrrTa6L5oRAkQ3AJkB9oYyoidJUlfyUF9LZYe0nUh/rACdGOUj LkdsHqhrHequJVuhKGi/HLM= =hbeU -----END PGP SIGNATURE----- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php