1
0
mirror of synced 2024-12-15 15:46:02 +03:00
doctrine2/Doctrine/Session/Common.php

20 lines
585 B
PHP
Raw Normal View History

2006-05-30 13:02:35 +04:00
<?php
Doctrine::autoload('Doctrine_Session');
/**
* standard session, the parent of pgsql, mysql and sqlite
*/
class Doctrine_Session_Common extends Doctrine_Session {
public function modifyLimitQuery($query,$limit = false,$offset = false) {
if($limit && $offset) {
$query .= " LIMIT ".$limit." OFFSET ".$offset;
} elseif($limit && ! $offset) {
$query .= " LIMIT ".$limit;
} elseif( ! $limit && $offset) {
$query .= " LIMIT 999999999999 OFFSET ".$offset;
}
return $query;
}
}
?>