国强极客
有问题请加微信:guoqiang7585
国强极客

Medoo查询条件+排序+LIMIT

Medoo查询条件+排序+LIMIT
全国大流量卡免费领
$database->debug()->select("book", "*", ["ORDER" => ["date" => "DESC"]]);
//SELECT * FROM `book` ORDER BY `date` DESC
$database->debug()->select("book", "*", ["view" => "1","ORDER" => ["date" => "DESC"]]);
//SELECT * FROM `book` WHERE `view` = '1' ORDER BY `date` DESC
$database->debug()->select("book", "*", [
        "AND" => [
            "type" => $_GET["type"],
            "view" => "1"
        ],"ORDER" => ["date" => "DESC"]
    ]);
    //SELECT * FROM `book` WHERE (`type` = '1' AND `view` = '1') ORDER BY `date` DESC

LIMIT

$datas = $database->select("dede_addonimages", [
    "aid",
    "taobaoid"
]
    ,[
    "OR" =>[
        "tklupdate[<]"=>"$isend",
        "tklupdate"=>0
    ]
    ,
        "ORDER" => ["aid" => "DESC"], "LIMIT" => [0,5]
    ]
);
赞赏
全国大流量卡免费领
对内容有疑问,请加我微信:guoqiang7585

国强极客

Medoo查询条件+排序+LIMIT
$database->debug()->select("book", "*", ["ORDER" => ["date" => "DESC"]]); //SELECT * FROM `book` ORDER BY `date`…
扫描二维码继续阅读
2020-03-16