select min(字段名) from tableName limit 0,1 最小
select * from tableName order by 字段名 DESC limit 0,1 最大
select * from tableName order by 字段名 ASC limit 0,1 最小
$strSql SELECT MAX(编号) as maxid FROM 唯一标识码$result=mysql_query($strSql,$myconn) or die(mysql_error())
$ROW=mysql_fetch_array($result)
$MAXID=$ROW['maxid']
写select id, case when (data1-now <data2-now) and (data1-now <data3-now) then data1when ...then data2
when ...then data3
where
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)