how do i work offline db then update successfully on-line db

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
blackbird
Forum Newbie
Posts: 3
Joined: Mon Jul 07, 2008 11:26 am

how do i work offline db then update successfully on-line db

Post by blackbird »

I have on PHP/MySQL application. online and offline.
how do I insert record in the offline MySQL db then update successfully on-line db?
Cann sommes one help me?
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: how do i work offline db then update successfully on-line db

Post by califdon »

blackbird wrote:I have on PHP/MySQL application. online and offline.
how do I insert record in the offline MySQL db then update successfully on-line db?
Cann sommes one help me?
Generally that's a bad idea to start with. Usually data should be stored in one place only. You can have back-ups. You can also have several databases that "replicate" each other, that is, synchronize the data on a scheduled basis, but that requires quite a lot of work to set up. You could write your application to write to both databases every time you updated anything, but you should have a very good reason why you want to do that. So it would be a good idea if you told us WHY you think you want to do this.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: how do i work offline db then update successfully on-line db

Post by Benjamin »

If this is something you only need to do occasionally, you could simply print all the queries to a file and then execute the file on the server using phpMyAdmin or the command line.

We really need to know why you need to do this however to give you a best answer.
blackbird
Forum Newbie
Posts: 3
Joined: Mon Jul 07, 2008 11:26 am

Re: how do i work offline db then update successfully on-line db

Post by blackbird »

Thanks to reply to my post.
basically I need my application to be install on USB for those who do not have internet connection. They can work off-line by recording data in the off-line MySQL db through the off-line application.
As soon as they have internet connection they should have the possibilities to upload (Update the on-line MySQL db).
for that purpose I want implement a small interface to help them interact between the off-line and the on-line database tables.
is there some body who can help me?
Thanks for your help
Post Reply