$sql="select * from tb_history where h_time like '%$select%' or h_username like '%$select%' or h_zone like '%$select%' order by h_id desc ";
$sqlquery=mysql_db_query($dbname,$sql);
while($result= mysql_fetch_array($sqlquery)){
code ผลรวมราคา Code (PHP)
<? $query4 = "SELECT sum(h_price) AS punch FROM tb_history where h_time like '%$select%' or h_username like '%$select%' or h_zone like '%$select%' ";
$result4 = mysql_query($query4) or die(mysql_error());
while($row4=mysql_fetch_array($result4)){
echo $row4['punch'];
}
?>
Tag : PHP
Date :
2010-12-17 14:09:10
By :
chonburi f.c
View :
1162
Reply :
1
No. 1
Guest
แบบนี้หรือปล่าวครับ ลองดูนะครับ
where (h_time like '%$select%' or h_username like '%$select%' or h_zone like '%$select%') [font=Verdana]and status = 'active'[/font]