Get Enum Value Using PHP MYSQL
by satheeshkumar[ Edit ] 2012-08-12 22:07:47
Get Enum Value Using PHP MYSQL,
$sql = mysql_query("SHOW COLUMNS FROM Tablename WHERE Field ='Enum field name'");
$Query = mysql_fetch_array($sql);
$type = $resultss['Type'];
preg_match('/enum((.*))$/', $resultss[1], $matches);
$vals = explode(',', $matches[1]);
echo $vals;