Minor display cleanup
[mirrors/Kyberia-bloodline.git] / scripts / articlethread.php
1 <?php
2 //requiring main config file with path/database etc. constants
3 require('../config/config.inc');
4
5 //connecting to database and creating universal $db object
6 require(SYSTEM_ROOT.'/inc/log.inc');
7 require(SYSTEM_ROOT.'/inc/database.inc');
8 require(SYSTEM_ROOT.'/inc/nodes.inc');
9 $db=new CLASS_DATABASE();
10
11
12 $q="select node_id,node_thread_vector from nodes where node_type='5'";
13 $set=$db->query($q);
14 while ($set->next()) {
15 $vector_array[$set->getString('node_id')]=$set->getString('node_thread_vector');
16 }
17
18 print_r($vector_array);
19 $q="select * from nodes where node_type='4' and node_thread_vector='0' and old_type='article' order by node_id asc";
20 $set=$db->query($q);
21 while ($set->next()) {
22 $vector_array[$set->getString('node_id')]=$vector_array[$set->getString('node_parent')].";".$set->getString('node_parent');
23 $db->query("update nodes set node_thread_vector='".$vector_array[$set->getString('node_parent')].";".$set->getString('node_parent')."' where node_id='".$set->getString('node_id')."'");
24 echo "update nodes set node_thread_vector='".$vector_array[$set->getString('node_parent')].";".$set->getString('node_parent')."' where node_id='".$set->getString('node_id')."'";
25 }
26 ?>
This page took 0.39861 seconds and 4 git commands to generate.