function _feedapi_get_stat in FeedAPI 5
Same name and namespace in other branches
- 6 feedapi.module \_feedapi_get_stat()
Return the type-specific statistics data
@name $only_val If TRUE, only the values are returned, no more
Parameters
$id: A numerical id
$type: Name of the type (variable)
Return value
$only_val = FALSE -> array("timestamp" => array(), "time" => array(), "value" => array());
1 call to _feedapi_get_stat()
- feedapi_admin_overview in ./
feedapi.module - Provide a UI for overviewing the existing feeds
File
- ./
feedapi.module, line 1502 - Handle the submodules (for feed and item processing) Provide a basic management of feeds
Code
function _feedapi_get_stat($id, $type, $only_val = FALSE) {
$result = db_query("SELECT timestamp, time, value FROM {feedapi_stat} WHERE type = '%s' AND id = %d", $type, $id);
while ($row = db_fetch_array($result)) {
if ($only_val) {
$stat[] = $row['value'];
}
else {
foreach (array(
'timestamp',
'time',
'value',
) as $member) {
$stat[$member][] = $row[$member];
}
}
}
return $stat;
}