Sorry for this question, but I never worked with SQLite, and I went through the SQLite site, downloaded the "Precompiled Binaries For Windows" files that tried to make them suitable for my purpose, but I could not, I saw with working tutorials with bases data tables.
My tasks are to get data from SQLite and put it in magento mysql DB. So, for this, I have a SQLite DB dump file as a .db3 file, a txt file with a db dump file size (20110125_SIZE).
So how can I import it into SQLite. Please, if any of you worked with SQLite3, help me understand the .db3 file and how I can see the records from them.
I have a sqlite3 db dump as dbname.db3,
So, I tried to link this sqllite with php. Here is my sample code I received from the forum.
$db = openDatabase();
unset($db);
function openDatabase() {
$dbFile = realpath('dbname.db3');
echo $dbFile . "\n";
$needDbCreate = !file_exists($dbFile);
$db = new SQLiteDatabase($dbFile) or die((file_exists($dbFile)) ? "Unable to open" : "Unable to create");
if($needDbCreate) {
}
return $db;
}
.
: "SQLiteException" 'SQLiteDatabase:: _ construct() [sqlitedatabase.-- construct]: " C:\wamp\www\SQLITE\index.php: 23 Stack : # 0 C:\WAMP\WWW\SQLITE\index.php(23): SQLiteDatabase β _ ( 'C:\WAMP\WWW\SQL...') 1 C:\wamp\www\SQLITE\index.php(15): openDatabase() # 2 {main} C:\wamp\www\SQLITE\index.php 23
sqldump PDO, .
try {
$dbh = new PDO("sqlite:C:\wamp\www\SQLITE\dbname.db3");
echo 'Db Connected <br/>';
}
catch(PDOException $e)
{
echo $e->getMessage();
}
, , , , .
, . ti php.
, .