psql db schema test
[mirrors/Kyberia-bloodline.git] / scripts / type2neuron.php
1 #!/usr/local/bin/php
2 <?php
3 require('../config/config.inc');
4 //connecting to database and creating universal $db object
5 require(SYSTEM_ROOT.'/inc/log.inc');
6 require(SYSTEM_ROOT.'/inc/database.inc');
7 require(SYSTEM_ROOT.'/inc/nodes.inc');
8 $db=new CLASS_DATABASE();
9
10 $type_id=3;
11 $dst_id=1058182;
12
13 $q="select node_creator, node_id from nodes where template_id='$type_id'";
14 $set=$db->query($q);
15
16 while ($set->next()) {
17 $node_id=$set->getString('node_id');
18 $creator=$set->getString('node_creator');
19 $q="insert into neurons set dst='$dst_id',src='$node_id',link='hard',synapse_creator='$creator'";
20 echo $q."\n";
21 $db->query($q);
22
23 }
24
25
26
27
28 ?>
This page took 0.315098 seconds and 4 git commands to generate.