|
Posted by Dejan on 06/10/06 01:37
-Lost <spam_ninjaREMOVEME@REMOVEMEcomcast.net> wrote in message
news:x8CdnfLgqOcD3xfZnZ2dnUVZ_rWdnZ2d@comcast.com...
> "Dejan" <ddundov_REMOVE_@veleri.hr> wrote in message
news:e6bkqo$5v7$1@ss408.t-com.hr...
My comp is going to have static ip address. So i have web server on my comp.
I will put cron assignment on server that is going to request
http://myipadres/this-php-script.php . So this script is executet on my
comp, it will connect on my local mysql database, and remote, so it cann
make comparasion.
Practicly i only nead that foreach loop with multidimensional array elements
comparasion (i simply don't know that).
----------------------------------------------------------------------------
--------------------
////////////////////////////////////////
// KONEKCIJA NA MySQL LOKALNI
////////////////////////////////////////
$db1 = mysql_connect("remote_server.com", "username1", "XXX") or die("Could
not connect.");
if(!$db1)
die("no db");
if(!mysql_select_db("smjestaj",$db1)) die("No database selected.");
////////////////////////////////////////
// KONEKCIJA NA MySQL REMOTE
////////////////////////////////////////
$db2 = mysql_connect("localhost", "username2", "XXX") or die("Could not
connect.");
if(!$db2)
die("no db");
if(!mysql_select_db("smjestaj2",$db2)) die("No database selected.");
////////////////////////////////////////
// ISPIS PODATAKA IZ TABLICE
////////////////////////////////////////
$result1 = mysql_query("select * from smjestaj", $db1);
$result2 = mysql_query("select * from smjestaj2", $db2);
HERE I NEAD THAT FOREACH LOOP FOR COMPARASION
HERE I NEAD THAT FOREACH LOOP FOR COMPARASION
HERE I NEAD THAT FOREACH LOOP FOR COMPARASION
mysql_free_result($result1);
mysql_free_result($result2);
mysql_close($db1);
mysql_close($db2);
----------------------------------------------------------------------------
--------------------
> How exactly do they "see" each other?
>
> I am not intimately familiar with the details of wget nor cron, but how
exactly will the
> script be ran in that fashion?
>
> Are you going to update the script with wget then cron it?
>
> Is there a reason why a local script cannot compare the two in-house?
>
> On that last note, do you need the entire script written or do you have a
base script?
>
> -Lost
>
>
[Back to original message]
|