User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 401,487 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,227 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 534 | Replies: 8
Reply
Join Date: Jul 2008
Posts: 2
Reputation: blackbird29 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
blackbird29 blackbird29 is offline Offline
Newbie Poster

PHP/MySQL Update table from offline version to online version

  #1  
Jul 7th, 2008
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?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2008
Location: Phoenix, AZ
Posts: 599
Reputation: R0bb0b is on a distinguished road 
Rep Power: 2
Solved Threads: 53
R0bb0b's Avatar
R0bb0b R0bb0b is offline Offline
Posting Pro

Re: PHP/MySQL Update table from offline version to online version

  #2  
Jul 8th, 2008
You will probably want to do a cron to a PHP Curl script that will pull maybe an xml or some type of delimited file from the live server representing the database. The what ever data is not live, send it back via Curl.
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” - Dr. Seuss
Reply With Quote  
Join Date: Dec 2007
Posts: 352
Reputation: OmniX is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 1
OmniX's Avatar
OmniX OmniX is offline Offline
Posting Whiz

Re: PHP/MySQL Update table from offline version to online version

  #3  
Jul 9th, 2008
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
Last edited by OmniX : Jul 9th, 2008 at 12:38 am.
Reply With Quote  
Join Date: Jul 2008
Posts: 2
Reputation: blackbird29 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
blackbird29 blackbird29 is offline Offline
Newbie Poster

Re: PHP/MySQL Update table from offline version to online version

  #4  
Jul 11th, 2008
Originally Posted by R0bb0b View Post
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
Reply With Quote  
Join Date: Jun 2008
Location: Phoenix, AZ
Posts: 599
Reputation: R0bb0b is on a distinguished road 
Rep Power: 2
Solved Threads: 53
R0bb0b's Avatar
R0bb0b R0bb0b is offline Offline
Posting Pro

Re: PHP/MySQL Update table from offline version to online version

  #5  
Jul 11th, 2008
Originally Posted by blackbird29 View Post
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/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.
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” - Dr. Seuss
Reply With Quote  
Join Date: Dec 2007
Posts: 352
Reputation: OmniX is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 1
OmniX's Avatar
OmniX OmniX is offline Offline
Posting Whiz

Re: PHP/MySQL Update table from offline version to online version

  #6  
Jul 11th, 2008
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).
Last edited by OmniX : Jul 11th, 2008 at 10:40 pm.
Reply With Quote  
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation: nav33n has a spectacular aura about nav33n has a spectacular aura about 
Rep Power: 8
Solved Threads: 239
nav33n's Avatar
nav33n nav33n is offline Offline
Posting Sensei

Re: PHP/MySQL Update table from offline version to online version

  #7  
Jul 12th, 2008
You need to make a simple php/mysql interface that lets you updates values for a database.
But his question is how to ?
Last edited by nav33n : Jul 12th, 2008 at 1:27 am.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

*PM asking for help will be ignored*
Reply With Quote  
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation: nav33n has a spectacular aura about nav33n has a spectacular aura about 
Rep Power: 8
Solved Threads: 239
nav33n's Avatar
nav33n nav33n is offline Offline
Posting Sensei

Re: PHP/MySQL Update table from offline version to online version

  #8  
Jul 12th, 2008
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.
Last edited by nav33n : Jul 12th, 2008 at 1:38 am.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

*PM asking for help will be ignored*
Reply With Quote  
Join Date: Jun 2008
Location: Phoenix, AZ
Posts: 599
Reputation: R0bb0b is on a distinguished road 
Rep Power: 2
Solved Threads: 53
R0bb0b's Avatar
R0bb0b R0bb0b is offline Offline
Posting Pro

Re: PHP/MySQL Update table from offline version to online version

  #9  
Jul 12th, 2008
Well Curl would work for the same purpose
http://us.php.net/manual/en/book.curl.php
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” - Dr. Seuss
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 2:13 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC