You are here

function faq_update in Frequently Asked Questions 5.2

Same name and namespace in other branches
  1. 6 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 222
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 ($node->revision) {
    faq_insert($node);
  }
  else {
    db_query("UPDATE {faq_questions} SET question = '%s' WHERE nid = %d AND vid = %d", $node->title, $node->nid, $node->vid);
  }
}