<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/platform.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d6522951\x26blogName\x3dJust+Blogging....:D\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dSILVER\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttps://arifalien.blogspot.com/search\x26blogLocale\x3den_US\x26v\x3d2\x26homepageUrl\x3dhttp://arifalien.blogspot.com/\x26vt\x3d-3135023925062658764', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe", messageHandlersFilter: gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER, messageHandlers: { 'blogger-ping': function() {} } }); } }); </script>

Wednesday, May 12, 2004

Function

//Fungsi untuk mengecek table agar tidak ada DULPIKASI data
function cek_tabel(){

global $namafile;
$query = mysql_query("select FTDATE,FTEXT,FTDNUM,FTTIME,FTDUR from trans_a order by FTDATE DESC limit 0 ,1") or die ("Query gagal: ".mysql_error());
$hasil=mysql_fetch_array($query);
$query2 = mysql_query("select * from trans where FTDATE= '$hasil[FTDATE]' and FTEXT='$hasil[FTEXT]' and FTDNUM='$hasil[FTDNUM]' and FTTIME='$hasil[FTTIME]'") or die ("Query gagal: ".mysql_error());
$hasil2=mysql_fetch_array($query2);
if ($hasil2[FTDUR] == $hasil[FTDUR]){
echo"Data yang dimasukkan sudah Ada
";
}
else {
simpan($namafile);
$hapus = mysql_query("delete from trans_a");
echo"
Data Baru Telah Tersimpan";
}
}

0 Komentar:

Post a Comment

<< Home