954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

PHP/MySQL Update table from offline version to online version

I have one application in two version: the online version and the offline version(USB).
How can I update the online version after some change in the offline database?

blackbird29
Newbie Poster
2 posts since Jul 2008
Reputation Points: 10
Solved Threads: 0
 

Does the offline version have access to the internet?

R0bb0b
Posting Shark
998 posts since Jun 2008
Reputation Points: 358
Solved Threads: 89
 

Best thing to do is to 'export' the required data from the database and then 'import' into the adjacent database.

You can use tools like phpMyAdmin, etc.

Hope that answers your question :)

OmniX
Practically a Master Poster
656 posts since Dec 2007
Reputation Points: 31
Solved Threads: 10
 
Does the offline version have access to the internet?


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 to 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

blackbird29
Newbie Poster
2 posts since Jul 2008
Reputation Points: 10
Solved Threads: 0
 
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 to 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


I would use something like this: http://forums.digitalpoint.com/showthread.php?t=918941&highlight=php+check+url+status#post8399126
every time the user opens the file. Upon "404 error" continue to work offline. Upon "successful response" open up online connection, proceed to compare and update online database, redirect the user to the online application.

R0bb0b
Posting Shark
998 posts since Jun 2008
Reputation Points: 358
Solved Threads: 89
 

You need to make a simple php/mysql interface that lets you updates values for a database.
Use it for both:

Offline:
Setup apache, phpMyAdmin, etc on their computers, plus the usb in.
Transfer files to htdocs.
Make changes where possible, done.
Transfer Back to USB.

Online is Online (if your host has phpMyAdmin - most do).

OmniX
Practically a Master Poster
656 posts since Dec 2007
Reputation Points: 31
Solved Threads: 10
 
You need to make a simple php/mysql interface that lets you updates values for a database.


;) But his question is how to ?

nav33n
Purple hazed!
Moderator
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
 
I would use something like this: http://forums.digitalpoint.com/showt...us#post8399126 every time the user opens the file. Upon "404 error" continue to work offline. Upon "successful response" open up online connection, proceed to compare and update online database, redirect the user to the online application.


Nice logic. But the above script didn't work for me. I opened a webpage( http://www.google.com ) and then, executed the script. It said, "still alive". Then, I disabled my lan and tried again! It again said, still alive. Then when I switched off my modem, restarted apache and tried 'http://localhost, it said "cannot work in offline mode". I am not sure is it the firefox or the script.

nav33n
Purple hazed!
Moderator
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
 

Well Curl would work for the same purpose
http://us.php.net/manual/en/book.curl.php

R0bb0b
Posting Shark
998 posts since Jun 2008
Reputation Points: 358
Solved Threads: 89
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You