Kyberia v2.3 - 1st revision from SVN (Without patches of kyberia.sk team)
[mirrors/Kyberia-bloodline.git] / scripts / content_innodb.php
diff --git a/scripts/content_innodb.php b/scripts/content_innodb.php
new file mode 100644 (file)
index 0000000..ec65e1f
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+//requiring main config file with path/database etc. constants
+require('../config/config.inc');
+
+//connecting to database and creating universal $db object
+require(SYSTEM_ROOT.'/inc/log.inc');
+require(SYSTEM_ROOT.'/inc/database.inc');
+require(SYSTEM_ROOT.'/inc/nodes.inc');
+$db=new CLASS_DATABASE();
+
+$qNCOld = "select * from node_content";
+$i=0;
+$set = $db->query($qNCOld);
+while ($set->next()) {
+  $i++;
+  if ($i%100==0) echo "$i nodes loaded\n";
+  $qNCNew = "update nodes set node_content='".addslashes($set->getString('node_content'))."' where node_id='".$set->getString('node_id')."'";
+  $db->query($qNCNew);
+}
+?>
\ No newline at end of file
This page took 0.089919 seconds and 4 git commands to generate.