Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92626408
queryfx.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Nov 22, 04:27
Size
753 B
Mime Type
text/x-php
Expires
Sun, Nov 24, 04:27 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22473018
Attached To
rPHU libphutil
queryfx.php
View Options
<?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
;
}
Event Timeline
Log In to Comment