Search the web
Sign In
New User? Sign Up
phpug · Kelompok Pengguna PHP Indonesia
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Pengkondisian dengan IF   Message List  
Reply | Forward Message #41157 of 42645 |
Dear Para Suhu

mohon bantuannya nih, ttg kondisi di PHP

saya ingin tampilan di tabel, dimana jika kondisi tertentu, maka warna
di cell tersebut berubah. adapun coding saya sbb

$query3="select suhu_local,suhu from ttemperature inner join tsuhu on
ttemperature.kode = tsuhu.kode where kodecab='$cabang' and
ttemperature.kode='$ruang' and hour(jam)='$jam' and tanggal='$tanggal'
and tanggal>='$tglawal' and tanggal<='$tglakhir' order by jam";
$tampil3=mysql_query($query3);
$data3=mysql_fetch_array($tampil3);
$suhu=$data3['suhu'];
$local=$data3['suhu_ local'];
if ($suhu > $local)
{$warnabahaya ="#CCCC00";
echo "<td
bgcolor='".$warnabahaya."'>" .$data3['suhu']. "</td>";}
else
{$warnabahaya ="#FFFFFF";
echo "<td>".$data3['suhu']."</td>";}

dari hasil koding diatas maka seolah olah semua menjadi warna bahaya

kira kira salahnya dimana ya..?

sebelumnya terima kasih

--
Akhirnya
Sedikit demi sedikit permasalahan terselesaikan
sedikit demi sedikit solusi di temukan
semoga tetap di jalur yang benar
belajar dan teruslah belajar




Fri Jul 10, 2009 1:23 am

hudiman@...
Send Email Send Email

Forward
Message #41157 of 42645 |
Expand Messages Author Sort by Date

Dear Para Suhu mohon bantuannya nih, ttg kondisi di PHP saya ingin tampilan di tabel, dimana jika kondisi tertentu, maka warna di cell tersebut berubah. adapun...
Hudiman
hudiman@...
Send Email
Jul 10, 2009
10:47 am

... [Non-text portions of this message have been removed]...
Alif Sulistiyanto
marsupilami_x
Offline Send Email
Jul 10, 2009
11:16 am

  mungkin salah di query sqlnya mungkin kalo pingin gampang ngecek mas jangan coba langsung menggunakan query dulu coba tes pake pogran kecil misal bikin...
Dimas Koro
dimas.koro
Offline Send Email
Jul 13, 2009
12:43 am

On Fri, 10 Jul 2009 08:23:53 +0700 ... mana bgcolor-nya ?...
Yanmarshus
yan@...
Send Email
Jul 10, 2009
11:19 am

if ($suhu > $local) {$warnabahaya ="#CCCC00"; echo "<td bgcolor='".$ warnabahaya. "'>" .$data3['suhu' ]. "</td>";} else {$warnabahaya ="#FFFFFF"; echo...
Perdana Adhitama
perdana_adhi...
Offline Send Email
Jul 10, 2009
3:56 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help