I need PHP code to convert the database. I tried How to convert mysql to SQLite using PHP but it dint have answer
2 Answers
I finally found its solution.
Save sh file available at
https://gist.github.com/943776
and execute
"./mysql2sqlite.sh DBNAME --databases DBNAME -u DB_USERNAME -pDB_PASSWORD | sqlite3 database.sqlite"(without qoutes and with "`")
in php file.
Save both files in one folder
Comments
Go to phpmyadmin click export database download as sql file.
Download it....
go to your sql lite management software import the .sql file
done...
8 Comments
Daniel
If you do not have access to PhpMyAdmin, you could use the mysql dump command and use this file to import it into your sqlite database.
Aakash Gupta
I need to do it using PHP script. Basically I need to get all the SQL queries of SQLite.
Aakash Gupta
Hi Michael! I want to do all these things via PHP code. Let me explain my requirements. I have to write a PHP code which dumps MYSQL database into SQLite. Can you help me in it?
Tschallacka
Uhm, simple? Do the mysql dump, save it to file, download the file, then write a new php file to which takes an input file, processes into the sql lite database...
Aakash Gupta
You still did not get my query. I want a PHP code to generate .sqlite file from a MYSQL database
|