Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P110
(An Untitled Masterwork)
Active
Public
Actions
Authored by
stwalkerster
on Feb 8 2017, 9:21 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Tags
None
Referenced Files
F9031:
Feb 8 2017, 9:21 PM
2017-02-08 21:21:25 (UTC+0)
Subscribers
None
$query = $this->buildQuery(array('*'));
$query .= $this->applyOrder();
// shuffle around hackily TODO: fix this abomination
$localParameterList = $this->parameterList;
$this->parameterList = array();
$query .= $this->applyLimit();
$limitParameters = $this->parameterList;
$statement = $this->database->prepare($query);
$countStatement = $this->database->prepare($countQuery);
$result = array();
foreach ($values as $v) {
// reset parameter list
$params = $localParameterList;
$params[] = $v;
$countStatement->execute($params);
// reapply the limit parameters
$params = array_merge($params, $limitParameters);
$statement->execute($params);
Event Timeline
stwalkerster
created this paste.
Feb 8 2017, 9:21 PM
2017-02-08 21:21:25 (UTC+0)
stwalkerster
created this object with visibility "Public (No Login Required)".
Log In to Comment