1
0
mirror of synced 2025-01-19 15:01:40 +03:00
doctrine2/classes/Session/Common.class.php
doctrine 16497adb6a
2006-04-19 16:01:36 +00:00

19 lines
584 B
PHP

<?php
/**
* standard session, the parent of pgsql, mysql and sqlite
*/
class Doctrine_Session_Common extends Doctrine_Session {
public function modifyLimitQuery($query,$limit = null,$offset = null) {
if(isset($limit) && isset($offset)) {
$query .= " LIMIT ".$limit." OFFSET ".$offset;
} elseif(isset($limit) && ! isset($offset)) {
$query .= " LIMIT ".$limit;
} elseif( ! isset($limit) && isset($offset)) {
$query .= " LIMIT 999999999999 OFFSET ".$offset;
}
return $query;
}
}
?>