$sql = "SELECT a.[kode]
,a.[nama] ket
,b.[nama] produk
,a.[harga_jual] harga
,case when a.[kosong]= 1 THEN 'Closed'
when a.[gangguan]= 1 THEN 'Gangguan'
ELSE 'Open' END AS aktif
FROM [otomax].[dbo].[produk] a, [otomax].[dbo].[operator] b
WHERE a.[kode_operator]=b.[kode] AND a.[aktif] = 1";
mysql_query("TRUNCATE TABLE dbase_name.tabel_harga",$con1);
$data = mssql_query($sql,$con2);
while ($v = mssql_fetch_array($data)){
$ins = "INSERT INTO dbase_name.`tabel_harga`
(`Kode`, `Keterangan`, `Produk`, `Harga`, `Status`, `last_update`)
VALUES ('".$v[0]."','".$v[1]."','".$v[2]."','".$v[3]."','".$v[4]."',NOW())";
mysql_query($ins,$con1);
echo $v[0]."-".$v[2]."\r\n";
}
?>
minta penjelasannya dong om.
yg buat ngambil data dari database otomax yg mna?
trus buat update ke hostingnya yg mna?