3

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
  • 1
    Um What do you need converted? Table structure? PHP Code? How to export from MySQL to SQLite 3? Commented 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. Thanks Commented May 19, 2011 at 14:23

1 Answer 1

2

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

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

2 Comments

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.
Hey Guys, Thanks for the response.. But I have found a link which solved my problem. Solution Link

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.