You are here

function new_faq_insert in Frequently Asked Questions 7.2

Implements hook_insert().

Inserts the faq node question text into the 'faq_questions' table.

Parameters

$node: The node object.

File

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

Code

function new_faq_insert($node) {
  db_insert('faq_questions')
    ->fields(array(
    'nid' => $node->nid,
    'vid' => $node->vid,
    'question' => $node->title,
    'detailed_question' => $node->detailed_question,
  ))
    ->execute();
}