php读取mysql排序问题
发布网友
发布时间:2022-05-15 01:56
我来回答
共2个回答
热心网友
时间:2023-08-11 21:23
<?php
$value = (int)$_POST['select'];
switch($value){
case 1:
$exec_idasc="select * from news order by id asc;
break;
caset 2:
$exec_idasc="select * from news order by id desc;
break;
}
?>
<form action="list" method="post" name="listform" id="listform">
<select name="select" size="1">
<option value="1" selected>id 升序</option>
<option value="2">id 降序</option>
</select>
</form>
热心网友
时间:2023-08-11 21:23
这个要用到ajex,把输出结果放入这个table,