select 始发地 目的地 起步价,sum(case when 区间 >0 and 区间 <= 20 then 单位价格 else '' end) '0-20(公斤)' ,
sum(case when 区间 >20 and 区间 <= 50 then 单位价格 else '' end) '20-50(公斤)' ,
sum(case when 区间 >50 and 区间 <= 100 then 单位价格 else '' end) '50-100(公斤)' from (你的sql语句) t group by t.始发地 ,t.目的地 ,t.起步价
$username = 'dabao0120'res = mysql_query(&my_connection, "SELECT
username, password FROM user WHERE username = '$username'")
能看明白吗?这是php的写法 你要注意的就是 查询语句字段为字符型的时候 需要用引号引起来
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)