GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: Git mirror of the CMS Made Simple 2.0 rewrite
Homepage: http://cmsmadesimple.org
Clone URL: git://github.com/tedkulp/cmsmadesimple-2-0.git
silmarillion (author)
Tue Aug 07 08:46:38 -0700 2007
commit  40f30e2ac7fbd097588c843f8e4bd533823bae08
tree    c81ed6cb3e8cf6c027b4bddd65560af6d3f0b0cb
parent  91dcf73009d06b0bfde815981ce58e9d560dc314
cmsmadesimple-2-0 / generatedump.php
100644 26 lines (22 sloc) 0.582 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
 
include_once(dirname(__FILE__)."/include.php");
function execute_dump(&$result) {
  global $gCms;
  $db = $gCms->db;
  while ($row = $result->FetchRow()) {
    $now = $db->DBTimeStamp(time());
    $length = strlen($now);
    #$now = substr($now, 1, $length - 2);
    $row["create_date"] = $now;
    $row["modified_date"] = $now;
    echo $db->GetInsertSQL($result, $row, false, true) . ";\n";
  }
}
 
global $gCms;
$db = $gCms->db;
$tablelist = $db->MetaTables('TABLES');
foreach ($tablelist as $tablename) {
  $result = $db->Execute("SELECT * FROM $tablename");
  execute_dump($result);
}
 
?>