1
0
mirror of synced 2025-01-31 20:41:44 +03:00
doctrine2/classes/Session/Common.class.php

20 lines
620 B
PHP
Raw Normal View History

2006-04-13 20:37:28 +00:00
<?php
require_once(Doctrine::getPath().DIRECTORY_SEPARATOR."Session.class.php");
2006-04-13 20:37:28 +00:00
/**
* 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) {
2006-04-19 16:01:36 +00:00
$query .= " LIMIT ".$limit." OFFSET ".$offset;
} elseif($limit && ! $offset) {
2006-04-15 20:03:12 +00:00
$query .= " LIMIT ".$limit;
} elseif( ! $limit && $offset) {
2006-04-19 16:01:36 +00:00
$query .= " LIMIT 999999999999 OFFSET ".$offset;
}
2006-04-15 20:03:12 +00:00
return $query;
2006-04-13 20:37:28 +00:00
}
}
?>