code/libraries/joomlatools/library/database/adapter/abstract.php
public function insert(KDatabaseQueryInsert $query)
    {
        $context = $this->getContext();
        $context->query = $query;

        //Execute the insert operation
        if ($this->invokeCommand('before.insert', $context) !== false)
        {
            //Check if we have valid data to insert, if not return false
            if ($context->query->values)
            {
                //Execute the query
                $context->result = $this->execute($context->query);
                $context->affected = $this->_affected_rows;

                $this->invokeCommand('after.insert', $context);
            }
            else $context->affected = false;
        }

        return $context->affected;
    }
public function insert(KDatabaseQueryInsert $query)
    {
        $context = $this->getContext();
        $context->query = $query;

        //Execute the insert operation
        if ($this->invokeCommand('before.insert', $context) !== false)
        {
            //Check if we have valid data to insert, if not return false
            if ($context->query->values)
            {
                //Execute the query
                $context->result = $this->execute($context->query);
                $context->affected = $this->_affected_rows;

                $this->invokeCommand('after.insert', $context);
            }
            else $context->affected = false;
        }

        return $context->affected;
    }
public function insert ( KDatabaseQueryInsert $ query ) { $ context = $ this -> getContext ( ) ; $ context -> query = $ query ; //Execute the insert operation if ( $ this -> invokeCommand ( 'before.insert' , $ context ) !== false ) { //Check if we have valid data to insert, if not return false if ( $ context -> query -> values ) { //Execute the query $ context -> result = $ this -> execute ( $ context -> query ) ; $ context -> affected = $ this -> _affected_rows ; $ this -> invokeCommand ( 'after.insert' , $ context ) ; } else $ context -> affected = false ; } return $ context -> affected ; }
Insert a row of data into a table.

@param KDatabaseQueryInsert $query The query object.
@return bool|integer  If the insert query was executed returns the number of rows updated, or 0 if
no rows where updated, or -1 if an error occurred. Otherwise FALSE.
Insert a row of data into a table .