1
0
mirror of synced 2024-12-14 15:16:04 +03:00
doctrine2/Doctrine/Session/Common.php
2006-05-30 09:02:35 +00:00

20 lines
585 B
PHP

<?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;
}
}
?>