$sql = mysql_db_query($dbname,"select sum(price),count(orderno) from order where pid between 4000 and 4077 and time between '17:00:00' and '22:50:59' and customer_info between 013 and 712 ");
$sql = mysql_db_query($dbname,"select sum(price),count(orderno) from order where pid between 4000 and 4077 and time between '22:51:00' and '02:00:00' and customer_info between 013 and 712 ");