public static function add(array $fields)
    {
        if (!isset($fields['sortorder'])) {
            $fields['sortorder'] = self::fetchNextSortOrder();
        }

        if (!Symphony::Database()->insert($fields, 'tbl_pages')) {
            return false;
        }

        return Symphony::Database()->getInsertID();
    }
public static function add(array $fields)
    {
        if (!isset($fields['sortorder'])) {
            $fields['sortorder'] = self::fetchNextSortOrder();
        }

        if (!Symphony::Database()->insert($fields, 'tbl_pages')) {
            return false;
        }

        return Symphony::Database()->getInsertID();
    }
public static function add ( array $ fields ) { if ( ! isset ( $ fields [ 'sortorder' ] ) ) { $ fields [ 'sortorder' ] = self :: fetchNextSortOrder ( ) ; } if ( ! Symphony :: Database ( ) -> insert ( $ fields , 'tbl_pages' ) ) { return false ; } return Symphony :: Database ( ) -> getInsertID ( ) ; }
Given an associative array of data, where the key is the column name
in `tbl_pages` and the value is the data, this function will create a new
Page and return a Page ID on success.

@param array $fields
Associative array of field names => values for the Page
@throws DatabaseException
@return integer|boolean
Returns the Page ID of the created Page on success, false otherwise.
Given an associative array of data where the key is the column name in tbl_pages and the value is the data this function will create a new Page and return a Page ID on success .