You are here

function certificate_snapshot_delete_by_node in Certificate 3.x

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

Delete all snapshots on a node.

Parameters

stdClass $node:

Return value

bool

1 call to certificate_snapshot_delete_by_node()
certificate_reset_certificates_action in ./certificate.module
Action to delete certificate snapshots on a node.

File

./certificate.module, line 528
Certificate module.

Code

function certificate_snapshot_delete_by_node($node) {
  $sql = "DELETE FROM {certificate_snapshots} WHERE nid = %d";

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

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