Query to create a forum

Lu Jia

Active member
PHP:
$db->query("INSERT INTO `xf_node` (`title`, `description`, `node_name`, `node_type_id`,    `parent_node_id`, `display_order`, `display_in_list`, `lft`, `rgt`, `depth`, `style_id`, `effective_style_id`) VALUES (...);");

What sould I put in the column 'lft' and 'rgt'?
 
You shouldn't use a query for this!

Everytime you want to create a new "xenforo element"(user,post,page,forum,thread,etc...) you should use the datawriter for this.
 
Have a look in the ControllerAdmin directory for the way XenForo does it, but basically, you create a DataWriter, set the values and save :)
 
Top Bottom