public function getXMLDBKeyName($type) {

        $result = '';

        switch ($type) {
            case XMLDB_KEY_PRIMARY:
                $result = 'primary';
                break;
            case XMLDB_KEY_UNIQUE:
                $result = 'unique';
                break;
            case XMLDB_KEY_FOREIGN:
                $result = 'foreign';
                break;
            case XMLDB_KEY_FOREIGN_UNIQUE:
                $result = 'foreign-unique';
                break;
            // case XMLDB_KEY_CHECK:  //Not supported
            //     $result = 'check';
            //     break;
        }
        // Return the normalized name
        return $result;
    }
public function getXMLDBKeyName($type) {

        $result = '';

        switch ($type) {
            case XMLDB_KEY_PRIMARY:
                $result = 'primary';
                break;
            case XMLDB_KEY_UNIQUE:
                $result = 'unique';
                break;
            case XMLDB_KEY_FOREIGN:
                $result = 'foreign';
                break;
            case XMLDB_KEY_FOREIGN_UNIQUE:
                $result = 'foreign-unique';
                break;
            // case XMLDB_KEY_CHECK:  //Not supported
            //     $result = 'check';
            //     break;
        }
        // Return the normalized name
        return $result;
    }
public function getXMLDBKeyName ( $ type ) { $ result = '' ; switch ( $ type ) { case XMLDB_KEY_PRIMARY : $ result = 'primary' ; break ; case XMLDB_KEY_UNIQUE : $ result = 'unique' ; break ; case XMLDB_KEY_FOREIGN : $ result = 'foreign' ; break ; case XMLDB_KEY_FOREIGN_UNIQUE : $ result = 'foreign-unique' ; break ; // case XMLDB_KEY_CHECK:  //Not supported //     $result = 'check'; //     break; } // Return the normalized name return $ result ; }
This function returns the correct name value for the
XMLDB_KEY_XXX passed as argument
@param int $type
@return string
This function returns the correct name value for the XMLDB_KEY_XXX passed as argument