2017 © Pedro Peláez
 

yii2-extension yii2-pq

A paged query class for Yii2 to deal with PHP7 changed in mysqlnd

image

ultimate-guitar/yii2-pq

A paged query class for Yii2 to deal with PHP7 changed in mysqlnd

  • Friday, June 29, 2018
  • by lebedevsky
  • Repository
  • 2 Watchers
  • 0 Stars
  • 1,464 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

yii2-pq

A paged query class for Yii2 to deal with PHP7 changes in mysqlnd, (*1)

It will load your result set the same way as pagination works using OFFSET and LIMIT., (*2)

This extension is 99% for MySQL users., (*3)

Installation

Just include it in your composer:, (*4)

php composer require "sammaye/yii2-pq":"~1.0.0"

Usage

$query = (new \sammaye\pq\Query)
    ->from(Title::tableName())
    ->where('live=1')
    ->limit(300)
    ->orderBy(['id' => SORT_DESC]);
foreach($query->each() as $k => $v){

And it will return in batches of 100 up to 300., (*5)

As you can see there is not much to learn about this extension except how to include it., (*6)

Note: There is no active record part to this query currently due to the nature of PHP class inheritance and inclusion which means I would have to copy the ActiveQuery entirely., (*7)

Why?

I noticed that many of my cronjobs failed after an upgrade to PHP7. It was not long before I realised that there were two changes since PHP5.4:, (*8)

Added to that, my own observations that unbuffered queries suck meant that I created this., (*9)

The Versions

29/06 2018

dev-master

9999999-dev

A paged query class for Yii2 to deal with PHP7 changed in mysqlnd

  Sources   Download

The Requires

  • php >=5.4.0

 

yii2 query pagination db

29/06 2018

1.0.2

1.0.2.0

A paged query class for Yii2 to deal with PHP7 changed in mysqlnd

  Sources   Download

The Requires

  • php >=5.4.0

 

yii2 query pagination db

29/06 2018

dev-pull_request

dev-pull_request

A paged query class for Yii2 to deal with PHP7 changed in mysqlnd

  Sources   Download

The Requires

  • php >=5.4.0

 

yii2 query pagination db

29/06 2018

1.0.1

1.0.1.0

A paged query class for Yii2 to deal with PHP7 changed in mysqlnd

  Sources   Download

The Requires

  • php >=5.4.0

 

yii2 query pagination db

04/10 2016

1.0.0

1.0.0.0

A paged query class for Yii2 to deal with PHP7 changed in mysqlnd

  Sources   Download

The Requires

  • php >=5.4.0

 

yii2 query pagination db