protected function insertDefault( $table, $rows ) {

        $columns = $this->getColumns( $rows );
        if ( empty( $columns ) ) return;

        $query = $this->insertHead( $table, $columns );
        $lists = $this->valueLists( $rows, $columns );

        foreach ( $lists as $list ) {

            $singleQuery = $query . $list;

            $this->onQuery( $singleQuery );

            $statement = $this->prepare( $singleQuery );
            $statement->execute();

        }

        return $statement; // last statement is returned

    }
protected function insertDefault( $table, $rows ) {

        $columns = $this->getColumns( $rows );
        if ( empty( $columns ) ) return;

        $query = $this->insertHead( $table, $columns );
        $lists = $this->valueLists( $rows, $columns );

        foreach ( $lists as $list ) {

            $singleQuery = $query . $list;

            $this->onQuery( $singleQuery );

            $statement = $this->prepare( $singleQuery );
            $statement->execute();

        }

        return $statement; // last statement is returned

    }
protected function insertDefault ( $ table , $ rows ) { $ columns = $ this -> getColumns ( $ rows ) ; if ( empty ( $ columns ) ) return ; $ query = $ this -> insertHead ( $ table , $ columns ) ; $ lists = $ this -> valueLists ( $ rows , $ columns ) ; foreach ( $ lists as $ list ) { $ singleQuery = $ query . $ list ; $ this -> onQuery ( $ singleQuery ) ; $ statement = $ this -> prepare ( $ singleQuery ) ; $ statement -> execute ( ) ; } return $ statement ; // last statement is returned }
Insert rows using one query per row

@param string $table
@param array $rows
@return \PDOStatement|null
Insert rows using one query per row