You are here

function uc_csv_report_id_load in Ubercart CSV 6.2

Same name and namespace in other branches
  1. 7.2 uc_csv.module \uc_csv_report_id_load()

implementation of hook_load()

File

./uc_csv.module, line 87

Code

function uc_csv_report_id_load($id) {
  if (is_numeric($id)) {
    $result = db_query("SELECT * FROM {uc_csv_reports} WHERE rid='%d';", $id);
    if ($result == TRUE) {
      $report = db_fetch_object($result);
    }
    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;
    }
    return $report;
  }
}