これを機能させることができないようです。すべての静的データは機能しますが、以下の変数については、
$customf = $row["ps_custom_fields"];
$cfarr = unserialize($customf);
$name = $cfarr[5];
$desc = $cfarr[2];
$cat = $cfarr[3];
$tags = $cfarr[4];
データを次のデータベースに移動させ、必要なすべてのデータを入力させることはできません。これは、すべての請求書、購入、およびデータ収集を処理する別のデータベースから実行される広告システム用であり、2 番目のデータベースは単に広告ウェブサイト。
//Connect to Local Server Database
$link1 = mysql_connect("localhost","usr","pass") or die("Opps Local Connection Failed!");
$db = mysql_select_db("pulseem1_ipb",$link1) or die ("Local Connection Failed Again!");
//Select Result to pull
$result = mysql_query("SELECT ad_id, ad_image, ad_link FROM ipb_nexus_ads")
or die ("Results Didnt pull Correctly!");
//Second Results to pull
$result2 = mysql_query("SELECT ps_custom_fields FROM ipb_nexus_purchases")
or die ("Second Results Didnt pull Correctly!");
while ($row = mysql_fetch_array($result,$result2))
{
//Put Results into a Variable
$customf = $row["ps_custom_fields"];
$cfarr = unserialize($customf);
$name = $cfarr[5];
$desc = $cfarr[2];
$cat = $cfarr[3];
$tags = $cfarr[4];
$url = $row["ad_link"];
$image = $row["ad_image"];
}
//Upload Advert to Remote Host with values of Variables
//Connect To Remote Database
$link2 = mysql_connect("localhost","user","pass") or die("Opps Second Connection Failed!");
$db = mysql_select_db("onlyclic_adverts",$link2) or die ("Second Connection Failed Again!");
// Insert Values from Original Database
mysql_query("INSERT INTO busadverts (advert_name, advert_url, advert_image, advert_description, advert_catergory, advert_tags, active) VALUES ('$name','$url','$image','$desc','$cat','$tags','1')");
//Release Connection and Results