Forum Moderators: coopster
so far all i can think of is a php function that does this:
1. clear the table in the localhost
2. make a select * from the remote table
3. generate a long string with the mysql INSERT command for each record selected in step (2).
4. execute each insert in the localhost mysql db
...what do you think about it?
Example:
[localhost...] << if user presses a button in there, the data will automatically be syncronized.
the user can then push a button and it will prompt them to save it somewhere
I, well myself and an admin, have built things like you're asking, they involve a bunch of different things
your steps in your above post would be fine, with larger dbs it may be very very slow. You would have to look at max_execution_time and probably a few other settings. If you make changes to your local then it doesn't have the samne settings as the remote server and could cause issues if you use the local for testing or running a dupe environment.
your best bet is to have the server do it and either push it to somewhere or when the user clicks the button it can ftp it to somewhere else, then IMPORT it to mysql.
This would be the fastest and stop the majority of possible problems and different environments.
you could have the cron run and attach it to an email if you wanted.
[hotscripts.com...]
[phpclasses.org...]
dc