select * form table order by time这样获取出数据但是需要判断下 time 如果time字段大于当前时间 那么
asc排顺但是 并不是所有的time值都大于当前的 时间 比如要实现的效果:假如今天是 2010-01-01实现排序的效果2010-02-03
2010-02-04
2010-02-05
-------------我分条线大家理解下我的意思
2010-01-30
2010-01-29
2010-01-28高手给个思路
asc排顺但是 并不是所有的time值都大于当前的 时间 比如要实现的效果:假如今天是 2010-01-01实现排序的效果2010-02-03
2010-02-04
2010-02-05
-------------我分条线大家理解下我的意思
2010-01-30
2010-01-29
2010-01-28高手给个思路
$mytime='2001-1-1';
$sa=@mysql_query("select * from table where time>=$mytime order by asc");
$sb=@mysql_query("select * from table where time<$mytime order by desc");
$a=@mysql_fetch_assoc($sa);
$b=@mysql_fetch_assoc($sb);
$c=array_merge($a,$b);
//剩下的事情,你输出数组c~