2 //requiring main config file with path/database etc. constants
3 require('../config/config.inc');
6 //connecting to database and creating universal $db object
7 require(SYSTEM_ROOT
.'/inc/log.inc');
8 require(SYSTEM_ROOT
.'/inc/database.inc');
9 require(SYSTEM_ROOT
.'/inc/nodes.inc');
10 $db=new CLASS_DATABASE();
12 $q="select node_id,node_thread_vector from nodes order by node_id asc";
14 while ($set->next()) {
16 $node_id=$set->getString('node_id');
17 $old_vector=$set->getString('node_thread_vector');
18 $old_vector=ltrim($old_vector,";");
19 $vector_array=explode(";",$old_vector);
20 foreach($vector_array as $vector_item) {
21 $new_item=str_pad($vector_item,VECTOR_CHARS
,"0",STR_PAD_LEFT
);
22 $new_vector .= ";".$new_item;
24 $new_id=str_pad($set->getString('node_id'),VECTOR_CHARS
,"0",STR_PAD_LEFT
);
25 // echo "AAAA".$new_id."BBBB";
26 $new_vector=$new_vector.";".$new_id;
27 $q="update nodes set node_vector='$new_vector' where node_id='$node_id'";
This page took 0.527986 seconds and 4 git commands to generate.