我的代码可以按特定的列排序一次,但我无法让它循环到asc、desc和default。现在,我可以点击头一次,它对它进行排序,每次点击之后都没有任何作用。我希望第一次单击排序desc,然后单击第二次单击排序asc,然后再单击返回到默认值(按ID排序),然后循环执行这些命令。到目前为止,有人能帮我改进分类吗?php
$query=mysql_query("select * from Books order by $field $sort"
如何实现
- entity\_type - _It contains the class name of the owning model._
- entity\_id -公共函数getStudents() {返回分类法:with( 'entity','entity.guardian‘) ->where('entity_type