8 define(
'CHEETAH_VERSION',
$GLOBALS[
'site'][
'ver'] .
'.' .
$GLOBALS[
'site'][
'build']);
31 if ($data != 1) { ## 1 only data
32 ##Read table structure
33 $Query =
"SHOW CREATE TABLE {$name}";
39 -- Table structure for table `{$name}`
42 DROP TABLE IF EXISTS `{$name}`;
45 while($Row = $Result->fetch(PDO::FETCH_NUM))
46 $this -> sInputs .= preg_replace(
"/ENGINE=.*/",
"ENGINE=MyISAM DEFAULT CHARSET={$this -> sCharset};\n", $Row[1]);
49 ### Read data from table
50 if ($data != 0) { ##Only strucure
55 -- Dumping data for table `{$name}`
60 $Query =
"SELECT * FROM {$name} ";
63 while($Row = $Result->fetch(PDO::FETCH_NUM)) {
64 $this -> sInputs .=
"INSERT INTO `{$name}` VALUES (";
66 for ($j = 0; $j < count($Row); $j++ ) {
67 if( is_null( $Row[$j] ) )
68 $this -> sInputs .=
"NULL, ";
73 $this -> sInputs = substr ($this -> sInputs, 0, strrpos($this -> sInputs,
','));
74 $this -> sInputs .=
");\n";
76 $this -> sInputs .=
"\n-- --------------------------------------------------------\n";
82 $Query =
"SHOW TABLES";
84 while($Row = $Result->fetch(PDO::FETCH_NUM))
97 $text = str_replace(
'\\',
'\\\\', $text );
98 $text = str_replace(
'\'',
'\'\
'', $text );
99 $text = str_replace(
"\n",
'\\n', $text );
100 $text = str_replace(
"\r",
'\\r', $text );