Showing posts with label yii2 query limit. Show all posts
Showing posts with label yii2 query limit. Show all posts

Tuesday, April 10, 2018

Yii2 limit

Create a new instance of yii db Query.

Offset() define which is starting point and limit() define the number of rows.

Limit Query in Yii2

$query = (new Query())->select(['id'])->from('user');
$query->limit(10)->offset(10);

Recent Update

yii2 session handling

use yii\web\Session; $session = Yii::$app->session; // start session $session->open(); // close session $session->close(); ...

Most Search