I have a database on mysql server. I want to convert that to sqlite3 database without using shell or perl scripts. I want some help converting the same using PHP. Any Help would be appreciated.
2
-
1Um What do you need converted? Table structure? PHP Code? How to export from MySQL to SQLite 3?Phill Pafford– Phill Pafford2011-05-19 14:18:34 +00:00Commented May 19, 2011 at 14:18
-
I want the entire structure and data from my mysql database to sqlite3 database. I want to do this using PHP. ThanksaToz– aToz2011-05-19 14:23:24 +00:00Commented May 19, 2011 at 14:23
Add a comment
|
1 Answer
Using PHP only would be rather troublesome, you'd have to get all the records from your mysql table, create the appropriate tables in sqlite3 and insert the records.
As far as I can tell you just want to to it automatically, so I would'nt see the harm in using shell programs. You could quite easily do this using the exec function: https://www.php.net/manual/en/function.exec.php
2 Comments
aToz
Hey Jefroen, Thanks for that.. I want to do it using PHP because I am hosting my website on a Yahoo small business server and apparently we cannot run system commands on that.
aToz
Hey Guys, Thanks for the response.. But I have found a link which solved my problem. Solution Link