5

I need PHP code to convert the database. I tried How to convert mysql to SQLite using PHP but it dint have answer

1

2 Answers 2

10

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

Sign up to request clarification or add additional context in comments.

Comments

4

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

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.
I need to do it using PHP script. Basically I need to get all the SQL queries of SQLite.
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?
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...
You still did not get my query. I want a PHP code to generate .sqlite file from a MYSQL database
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.