Kyberia v2.3 - 1st revision from SVN (Without patches of kyberia.sk team)
[mirrors/Kyberia-bloodline.git] / scripts / fix_db_flaws.php
1 <?
2
3 require('config/config.inc');
4 require(SYSTEM_ROOT.'inc/database.inc');
5
6 $db=new CLASS_DATABASE();
7
8 $query = "select * from nodes where node_name = 'maart' and external_link = 'db://user'";
9 $set = $db->query($query);
10
11 $count = $set->getNumRows();
12
13 // echo "<b>Fixing ownership problems for $count users...</b><br><br>";
14
15 while($set->next())
16 {
17 echo $set->getString('node_id')." :: ".$set->getString('node_name')."<br>";
18 $victims[] = $set->getString('node_id');
19 }
20
21 // foreach($victims as $target)
22 // {
23 // $query = "update nodes set node_creator = '$target' where node_id = '$target'";
24 // $db->query($query);
25 // echo "User_id $target ownership problem fixed.<br>";
26 // }
27
28 // echo "<br><br><b>Fix script finished!<br>U has to believe that nothing has fucked up ;o)!</b>";
29
30 ?>
This page took 0.297983 seconds and 4 git commands to generate.