You are here

function certificate_snapshot_delete in Certificate 3.x

Same name and namespace in other branches
  1. 8.3 certificate.module \certificate_snapshot_delete()
  2. 6.2 certificate.module \certificate_snapshot_delete()
  3. 6 certificate.module \certificate_snapshot_delete()
  4. 7.3 certificate.module \certificate_snapshot_delete()
  5. 7.2 certificate.module \certificate_snapshot_delete()

Remove snapshot.

Parameters

stdClass $account:

stdClass $node:

Return value

bool

File

./certificate.module, line 510
Certificate module.

Code

function certificate_snapshot_delete($account, $node) {
  $sql = "DELETE FROM {certificate_snapshots} WHERE uid = %d AND nid = %d";

  // TODO Please review the conversion of this statement to the D7 database API syntax.

  /* db_query($sql, $account->uid, $node->nid) */
  db_delete('certificate_snapshots')
    ->condition('uid', $account->uid)
    ->condition('nid', $node->nid)
    ->execute();
  return TRUE;
}