Jump to content

SQlite and Mysql huge problem.


paulman888888

Recommended Posts

Hi everyone,

I installed a application that uses SQlite3 and no other.

What i want to do is to Keep Mysql database the same as the SQlite.

 

Why? Because i understand Mysql syntax.

 

I don't no how to copy SQlite3 database to Mysql?

I think i would 'TRUNCATE TABLE' the table then some sort of loop that takes data from SQlite and INSERTS it into The MySQL.

 

Please Help

Thankyou

Paul

Link to comment
Share on other sites

select * from sqlite_db_table_name

 

query the dbase, and make a loop to insert those registers into the new database, just use the fields that you need from the source table, something like


while ($register=sqlite_fetch_array($sqlite_query_result)) {
  $query2 = "INSERT INTO mysql_table (field_name1, field_name2,...) VALUES (field_value1, field_value2,....)";
  $query_result2 = mysql_query($query2);
}

 

 

but you should check to make the right connections with both databases, in order to query propperly

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.