墨灵
2016-08-29 10:37
medoo好像有一个问题,就是ORDER的时候是不支持DESC,不知道是不是只是我有问题?
$database->select("account", "user_id", [ // "ORDER" => "age DESC" "ORDER" => "age", ]); // SELECT user_id FROM account // ORDER BY age // 多个排序 $database->select("account", "user_id", [ "ORDER" => ['user_name DESC', 'user_id ASC'] ]); // SELECT user_id FROM account // ORDER BY "user_name" DESC, "user_id" ASC
经过同学提醒,1.1版本之后,order语法有些变更
老师是medoo的作者?或者是成员?
//$sql = 'SELECT mid,mname FROM member ORDER BY mid DESC LIMIT 0,1'; $result = $model->select( "member", ["mid","mname"], ["ORDER"=>["mid"=>"DESC"],"LIMIT"=>[0,1]] );
从零开始打造自己的PHP框架
48187 学习 · 162 问题
相似问题