function uc_csv_report_id_load in Ubercart CSV 7.2
Same name and namespace in other branches
- 6.2 uc_csv.module \uc_csv_report_id_load()
Load arguments from URL
If they are valid return a valid report object with all the trimmings.
File
- ./
uc_csv.module, line 104
Code
function uc_csv_report_id_load($id) {
if (is_numeric($id)) {
$result = db_query("SELECT * FROM {uc_csv_reports} WHERE rid=:rid;", array(
':rid' => $id,
));
$report = $result
->fetchObject();
if (isset($report->report_name) && $report->report_name) {
return $report;
}
else {
drupal_set_message('Unable to load the requested report. Please report this error with a snapshot of your uc_csv_reports table', 'error');
return FALSE;
}
}
else {
return FALSE;
}
}