we need remove / delete all articles from database. all old articles in database was only testing purposes
i mean articles as class like article, u can remove any node from tree
include "some_db_layer";
$q = "
SELECT node_id
FROM `ezcontentobject`
LEFT JOIN ezcontentobject_tree ON `ezcontentobject`.id = ezcontentobject_tree.contentobject_id
WHERE `contentclass_id` = 2 AND node_id IS NOT NULL
";
//contentclass_id` = 2 is our id for articles
$res = $db->fetch_all($q);
foreach ( $res as $value) {
$rootNode = eZContentObjectTreeNode::fetch( $value['node_id'] );
//delete, realy delete records from dbase,
$rootNode->removeNodeFromTree(false);
}
Entries (RSS)