Page MenuHomePhorge

queryfx.php
No OneTemporary

Size
753 B
Referenced Files
None
Subscribers
None

queryfx.php

<?php
function queryfx(AphrontDatabaseConnection $conn, $sql /* , ... */) {
$argv = func_get_args();
$query = call_user_func_array('qsprintf', $argv);
$conn->setLastActiveEpoch(time());
$conn->executeQuery($query);
}
function queryfx_all(AphrontDatabaseConnection $conn, $sql /* , ... */) {
$argv = func_get_args();
call_user_func_array('queryfx', $argv);
return $conn->selectAllResults();
}
function queryfx_one(AphrontDatabaseConnection $conn, $sql /* , ... */) {
$argv = func_get_args();
$ret = call_user_func_array('queryfx_all', $argv);
if (count($ret) > 1) {
throw new AphrontCountQueryException(
pht('Query returned more than one row.'));
} else if (count($ret)) {
return reset($ret);
}
return null;
}

File Metadata

Mime Type
text/x-php
Expires
Mon, May 12, 2:01 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
111412
Default Alt Text
queryfx.php (753 B)

Event Timeline