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
https://forums.phpfreaks.com/topic/130862-sqlite-and-mysql-huge-problem/
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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.