|
thanks boardmanager..dah boleh..u r my hero..hehehe...lagi 1 kalo nak buat mcm inbox email kite tu..bile ader email bru masuk dier akan kuar bilangan kat tepi ader berape email yg bru masuk..cane ek..? |
|
|
|
|
|
|
|
tu ko kena buat 1 field dlm database utk status email (unread,read)
lepas tu count ler $sql = "SELECT COUNT(*) FROM table WHERE email_status = 'unread'"; |
|
|
|
|
|
|
|
Originally posted by BorderManager at 30-1-2009 12:55 PM
tu ko kena buat 1 field dlm database utk status email (unread,read)
lepas tu count ler $sql = "SELECT COUNT(*) FROM table WHERE email_status = 'unread'";
hmm..kene create table baru or selitkan status email tu kat table yg tmpt simpan email tu?...so nanti mase kite send email ke org tu..kite simpan status tu as unread la ye..set default dier...pastu bile org tu dah bukak email tu dier akan set read ke?..kalo nak setkan unread tu retila sbb just masukkan default unread tu dlm code insert..tp bila user dah bace email n dier akan tukar status kepada read tu buat cane?..update status ke? |
|
|
|
|
|
|
|
Balas #82 BorderManager\ catat
boleh aku tambah...
kalau nak bagi query tu laju sket... buat cenggini
$sql = "SELECT COUNT(email_status) FROM table WHERE email_status = 'unread'";
--> kita amik apa yang perlu je.. so nanti kalau data banyak... performance tak la teruk sangat..
sorry border.. menyampuk |
|
|
|
|
|
|
|
Originally posted by i212 at 31-1-2009 09:54 AM
boleh aku tambah...
kalau nak bagi query tu laju sket... buat cenggini
$sql = "SELECT COUNT(email_status) FROM table WHERE email_status = 'unread'";
--> kita amik apa yang perlu je.. so na ...
ooo..it's ok...tq....tapi cane nak wat tu?...tul ke aper yg aku kate kat post 83 tu? |
|
|
|
|
|
|
|
boardmanager...yg pasal popup dulu kan...kenape bile aku nak panggil data utk kuar kat popup dier tak kuar ek..tp bila aku xgune popup data tu ader plak..nape ek? |
|
|
|
|
|
|
|
Balas #85 pzan213\ catat
macam tu la...
nak bagi ok lagi.. just buat flag dgn 1 char je utk represent unread/read
cth:
U = unread
R = read |
|
|
|
|
|
|
|
tak pun ko letak as binary je 1 0
popup yg mana n |
|
|
|
|
|
|
|
tol ke coding ni?..penggunaan AND..
$Query="UPDATE temujanji SET status='$status' WHERE nokp = '$nokp' AND bil ='$bil' "; |
|
|
|
|
|
|
|
Balas #89 pzan213\ catat
btul la tu
nape.. tak jalan ka? |
|
|
|
|
|
|
|
Originally posted by BorderManager at 31-1-2009 09:59 PM
tak pun ko letak as binary je 1 0
popup yg mana n
aku ader wat satu popup...
page 1 - page biase
page 2 - aku wat popup...
so data2 yg aku masukkan nak dipaparkan pada popup..kirenye aku post la data tu...tp apesal data tu tak kuar ek kat popup....
tp kalo aku gantikan page 2 tu kpd page biase...data tu kuar plak.. |
|
|
|
|
|
|
|
Originally posted by i212 at 31-1-2009 11:03 PM
btul la tu
nape.. tak jalan ka?
jalan tu jln...tp dier xupdate dlm database..tp bile aku buang bil tu..dier update...tp dier update smua skali status yg punya ic yg sama... |
|
|
|
|
|
|
|
cuba check $bil tu ada value ke tak... |
|
|
|
|
|
|
|
dah post dah value tu dr page sblm tu... |
|
|
|
|
|
|
|
Balas #96 pzan213\ catat
value tu sampai ke tak?...
cuba try test uji bubuh echo $bil tgk... ada value tak... |
|
|
|
|
|
|
|
dah isi pun bil tu...tp tu yg pelik dier tak update...hmmm... |
|
|
|
|
|
|
|
bil tu type ape?
Char ke atau Integer?
cuba buang tanda (') tu utk bil... ..
$Query="UPDATE temujanji SET status='$status' WHERE nokp='$nokp' AND bil=$bil "; |
|
|
|
|
|
|
|
ha'a..lupe lak..kalo bil tu integer xyah isi ' ' kan? |
|
|
|
|
|
|
| |
|