function get_enum($table,$clname){ $Query="SHOW COLUMNS FROM `$table` LIKE '$clname'"; $result = $this->db->query($Query) or die("Get Enum value Query"); if($result){ $row = mysql_fetch_array( $result , MYSQL_NUM ); $regex = "/'(.*?)'/"; preg_match_all( $regex , $row[1], $enum_array ); $enum_fields = $enum_array[1]; return $enum_fields; } return false; }
No comments:
Post a Comment