protected function insertBatch( $table, $rows ) {

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

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

        $this->onQuery( $query );

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

        return $statement;

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

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

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

        $this->onQuery( $query );

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

        return $statement;

    }
protected function insertBatch ( $ table , $ rows ) { $ columns = $ this -> getColumns ( $ rows ) ; if ( empty ( $ columns ) ) return ; $ query = $ this -> insertHead ( $ table , $ columns ) ; $ lists = $ this -> valueLists ( $ rows , $ columns ) ; $ query .= implode ( ", " , $ lists ) ; $ this -> onQuery ( $ query ) ; $ statement = $ this -> prepare ( $ query ) ; $ statement -> execute ( ) ; return $ statement ; }
Insert rows using a single batch query

@param string $table
@param array $rows
@return \PDOStatement|null
Insert rows using a single batch query