_insert example


        /** * A read-only row cannot be saved. */
        if ($this->_readOnly === true) {
            throw new Zend_Db_Table_Row_Exception('This row has been marked read-only');
        }

        /** * Run pre-INSERT logic */
        $this->_insert();

        /** * Execute the INSERT (this may throw an exception) */
        $data = array_intersect_key($this->_data, $this->_modifiedFields);
        $primaryKey = $this->_getTable()->insert($data);

        /** * Normalize the result to an array indexed by primary key column(s). * The table insert() method may return a scalar. */
        

    public function getCompiledInsert(bool $reset = true)
    {
        if ($this->validateInsert() === false) {
            return false;
        }

        $sql = $this->_insert(
            $this->db->protectIdentifiers(
                $this->removeAlias($this->QBFrom[0]),
                true,
                null,
                false
            ),
            array_keys($this->QBSet),
            array_values($this->QBSet)
        );

        if ($reset === true) {
            
Home | Imprint | This part of the site doesn't use cookies.