2006-04-13 20:37:28 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* standard session, the parent of pgsql, mysql and sqlite
|
|
|
|
*/
|
|
|
|
class Doctrine_Session_Common extends Doctrine_Session {
|
2006-04-15 20:03:12 +00:00
|
|
|
public function modifyLimitQuery($query,$limit = null,$offset = null) {
|
2006-04-19 16:01:36 +00:00
|
|
|
if(isset($limit) && isset($offset)) {
|
|
|
|
$query .= " LIMIT ".$limit." OFFSET ".$offset;
|
|
|
|
} elseif(isset($limit) && ! isset($offset)) {
|
2006-04-15 20:03:12 +00:00
|
|
|
$query .= " LIMIT ".$limit;
|
2006-04-19 16:01:36 +00:00
|
|
|
} elseif( ! isset($limit) && isset($offset)) {
|
|
|
|
$query .= " LIMIT 999999999999 OFFSET ".$offset;
|
|
|
|
}
|
2006-04-15 20:03:12 +00:00
|
|
|
|
|
|
|
return $query;
|
2006-04-13 20:37:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|