function answers_delete in Answers 5.2
File
- ./
answers.module, line 390 - Enables the creation of question nodes that can be answered by posting answer nodes.
Code
function answers_delete($node) {
db_query('DELETE FROM {quests} WHERE nid = %d', $node->nid);
$tresult = db_query('SELECT * FROM {answers} WHERE qid = %d', $node->nid);
while ($answernode = db_fetch_object($tresult)) {
node_delete($answernode->nid);
}
db_query('DELETE FROM {answers} WHERE nid = %d OR qid= %d', $node->nid, $node->nid);
}