20 lines
585 B
PHP
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;
|
||
|
}
|
||
|
}
|
||
|
?>
|