Reply to Re: Mysql data copy HELP

Your name:

Reply:


Posted by Jiri Fogl on 10/13/92 11:44

Create a small PHP script, which connects to first database, reads data
and store them in some kind of object or array (as you like), closes
connection, then connects to the other database and write data.

Place this script to your local webserver.

If you use Linux, then you need to add a record to your Cron to run
periodically this command:
wget http://localhost/my_sync_script.php > /dev/null

If you use Windows, you will use Scheduled tasks instead of Cron, and
you need to find something like wget. I think there is wget for Windows,
or try running your browser with parameter to open
http://localhost/my_sync_script.php


Dejan wrote:
> Hy
>
> Sorry for my terreble english.
> I have mysql table1 on my local comp. It looks something like this.
>
>
> ----------------------------------------------------------------------------
> -
> broj_tel | poruka | sifra |
> grad | id |
> ----------------------------------------------------------------------------
> |
> +385912701600 0 Zprod rijeka
> 5 |
> ----------------------------------------------------------------------------
> |
> +385912701699 1 kprod crikvenica
> 3 |
> ----------------------------------------------------------------------------
> -
>
>
> On the remote server (web hosting) i have table2 looking something like
> this:
>
> ----------------------------------------------------------------------------
> ---------
> id_independant | Name | Surname | broj_tel
> | poruka |
> ----------------------------------------------------------------------------
> --------- |
> 11122 Martin Johnes
> +385912701600 1 |
> ----------------------------------------------------------------------------
> ----------|
> 16163 John Doe
> +385912701699 0 |
> ----------------------------------------------------------------------------
> ----------
>
> Question: I nead periodicly (some scheduler, my concern) to make something
> like this:
>
> select * from table1
> insert into table2 (poruka) whare table1.broj_tel = table2.broj_tel
>
> To read the data from table1, and inserts into table2 coloumn poruka whare
> tabel1.broj_tel i equal table2.broj_tel
> Problem is that the data is in diferent databases.
>
> Any ideas?
> Tnx in advance
> Dejan
>
>
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация