public static function getEnumPairs($table, $column): array
    {
        $result = self::q_assoc_row('SHOW COLUMNS FROM `' . self::sql_prepare($table) . '` WHERE `field` = "' . self::sql_prepare($column) . '"');
        $result = str_replace(["enum('", "')", "''"], ['', '', "'"], $result['Type']);
        $result = explode("','", $result);

        $res = [];

        foreach ($result as $v) {
            $res[$v] = Converter::charsToNormalTitle($v);
        }

        return $res;
    }
public static function getEnumPairs($table, $column): array
    {
        $result = self::q_assoc_row('SHOW COLUMNS FROM `' . self::sql_prepare($table) . '` WHERE `field` = "' . self::sql_prepare($column) . '"');
        $result = str_replace(["enum('", "')", "''"], ['', '', "'"], $result['Type']);
        $result = explode("','", $result);

        $res = [];

        foreach ($result as $v) {
            $res[$v] = Converter::charsToNormalTitle($v);
        }

        return $res;
    }
public static function getEnumPairs ( $ table , $ column ) : array { $ result = self :: q_assoc_row ( 'SHOW COLUMNS FROM `' . self :: sql_prepare ( $ table ) . '` WHERE `field` = "' . self :: sql_prepare ( $ column ) . '"' ) ; $ result = str_replace ( [ "enum('" , "')" , "''" ] , [ '' , '' , "'" ] , $ result [ 'Type' ] ) ; $ result = explode ( "','" , $ result ) ; $ res = [ ] ; foreach ( $ result as $ v ) { $ res [ $ v ] = Converter :: charsToNormalTitle ( $ v ) ; } return $ res ; }
Get values available for column in table
@param string $table
@param string $column
@return array
Get values available for column in table