You are here

function faq_update in Frequently Asked Questions 6

Same name and namespace in other branches
  1. 5.2 faq.module \faq_update()
  2. 7.2 faq.module \faq_update()
  3. 7 faq.module \faq_update()

Updates the faq node question text in the 'faq_questions' table.

Parameters

$node: The node object.

File

./faq.module, line 261
The FAQ module allows users to create a FAQ page, with questions and answers displayed in different styles, according to the settings.

Code

function faq_update($node) {
  if (!empty($node->revision)) {
    faq_insert($node);
  }
  else {
    db_query("UPDATE {faq_questions} SET question = '%s', detailed_question = '%s' WHERE nid = %d AND vid = %d", $node->title, $node->detailed_question, $node->nid, $node->vid);
  }
}