function certificate_snapshot_load in Certificate 6
Same name and namespace in other branches
- 8.3 certificate.module \certificate_snapshot_load()
- 6.2 certificate.module \certificate_snapshot_load()
- 7.3 certificate.module \certificate_snapshot_load()
- 7.2 certificate.module \certificate_snapshot_load()
- 3.x certificate.module \certificate_snapshot_load()
Quick certificates snapshot check.
Parameters
$account:
$node:
Return value
A single certificate snapshot in array format, or FALSE if none matched the incoming ID.
1 call to certificate_snapshot_load()
- certificate_single in ./
certificate.pages.inc - Generate a single certificate.
File
- ./
certificate.module, line 620 - Certificate module.
Code
function certificate_snapshot_load($account, $node) {
$sql = "SELECT * FROM {certificate_snapshots} WHERE uid = %d AND nid = %d";
$result = db_query($sql, $account->uid, $node->nid);
if ($snapshot = db_fetch_array($result)) {
return $snapshot;
}
else {
return FALSE;
}
}