- Timestamp:
- 04/06/09 02:06:38 (3 years ago)
- Location:
- test/mysql2sqlite
- Files:
-
- 2 edited
-
avalon.sql (modified) (1 diff)
-
mysql2sqlite.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
test/mysql2sqlite/avalon.sql
r208 r210 74 74 `subject` VARCHAR(128) NOT NULL, 75 75 `message` TEXT NOT NULL, 76 `date` INTEGER NOT NULL 76 `date` INTEGER NOT NULL, 77 `draft` INTEGER NOT NULL 77 78 ); 78 79 -
test/mysql2sqlite/mysql2sqlite.php
r208 r210 162 162 echo "Process table `message2send`\n"; 163 163 164 $sql = "SELECT `id`, `id_parent`, `id_forum`, `subject`, `message`, UNIX_TIMESTAMP(`date`) FROM `message2send`";165 $query = mysql_unbuffered_query($sql, $mysql_connection) or die ("mysql_query: " . mysql_error($mysql_connection) . "\n"); 166 167 $row = mysql_fetch_row($query); 168 169 while ($row !== false) 170 { 171 $sql = "INSERT INTO `message2send` VALUES (" . $row[0] . ", " . $row[1] . ", " . $row[2] . ", " . quoteString($row[3]) . ", " . quoteString($row[4]) . ", " . $row[5] . ")";164 $sql = "SELECT `id`, `id_parent`, `id_forum`, `subject`, `message`, UNIX_TIMESTAMP(`date`), `draft` FROM `message2send`"; 165 $query = mysql_unbuffered_query($sql, $mysql_connection) or die ("mysql_query: " . mysql_error($mysql_connection) . "\n"); 166 167 $row = mysql_fetch_row($query); 168 169 while ($row !== false) 170 { 171 $sql = "INSERT INTO `message2send` VALUES (" . $row[0] . ", " . $row[1] . ", " . $row[2] . ", " . quoteString($row[3]) . ", " . quoteString($row[4]) . ", " . $row[5] . ", " . $row[6] . ")"; 172 172 173 173 if ($sqlite_connection->exec($sql) === false)
Note: See TracChangeset
for help on using the changeset viewer.
