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
tedkulp (author)
Tue Aug 15 15:20:42 -0700 2006
commit  49a288ea7319d12cda2fe88efc90897901361ad8
tree    4d86527dfe9c07d830d831c90790037a0cf644b1
parent  da9f20b2ba57e00e4ccb7c364be2f0536e8a79f8
cmsmadesimple-2-0 / generatedump.php
100644 24 lines (19 sloc) 0.532 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
<?php
 
include_once(dirname(__FILE__)."/include.php");
 
function execute_dump(&$result) {
  global $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";
  }
}
 
$tablelist = $db->MetaTables('TABLES');
foreach ($tablelist as $tablename) {
  $result = $db->Execute("SELECT * FROM $tablename");
  execute_dump($result);
}
 
?>