2 // ini_set("error_reporting", "E_ALL & ~E_NOTICE");
4 require('config/config.inc');
5 require(SYSTEM_ROOT
.'inc/database.inc');
7 $db=new CLASS_DATABASE();
9 $vector_size = VECTOR_CHARS
;
13 $query = "select node_thread_vector from tiamat where node_id = '$target'";
14 $set = $db->query($query);
16 $parent_vector = $set->getString('node_thread_vector');
18 $query = "select * from nodes where node_parent = '$target'";
19 $set = $db->query($query);
23 $level_one[$set->getString('node_id')] = $set->getString('node_name');
30 $test = str_split($parent_vector, $vector_size);
34 echo "parent node_id :: $target <br /><br />";
36 $query = "insert into nodes
37 (node_id, node_name, node_parent, node_vector, node_type, node_external_access,
38 node_system_access, node_children_count, node_creator, node_created,
39 lastchild_created, k, node_views, node_descendant_count, lastdescendant_created, template_id)
41 tiamat.node_id, tiamat.node_name, tiamat.node_parent, tiamat.node_thread_vector, tiamat.node_type,
42 tiamat.node_external_access, tiamat.node_system_access, tiamat.node_children_count, tiamat.node_creator,
43 tiamat.node_created, tiamat.lastchild_created, tiamat.k, tiamat.node_views, tiamat.node_descendant_count,
44 tiamat.lastdescendant_created, tiamat.template_id from tiamat where tiamat.node_id = '$target' limit 1";
46 // $db->query($query);
47 // echo $query."<br><br>";
49 // echo "recovered!<br /><br />";
51 echo "starting update process at vector $parent_vector ...<br /><br />";
53 foreach($level_one as $target_id => $target_name)
55 $q = "select * from nodes where node_vector like '%$target_id%'";
57 /* $raise = $db->query($q);
60 $q = "update nodes set node_vector = '".$parent_vector.$raise->getString('node_vector')."' where node_id = '".$raise->getString('node_id')."'";
66 echo "update finished!";
This page took 0.725094 seconds and 4 git commands to generate.