我想先订购navigationItem.rightBarButtonItems = [btnPlus, fixedSpace, btnRating]
@objc func OnbtnPlusTouched()
{
guard let uivc = storyboard!.instantiateViewController(withIdentifier: "FifthViewController") as? FifthViewController else {
return
}
navigationController!.pushViewController(uivc, animated: true)
,然后订购featured_due
,然后订购nard_apply_date_due
post_date
排序代码是:
$join .= " LEFT JOIN (
SELECT post_id, meta_value as featured_due
FROM $wpdb->postmeta
WHERE meta_key = 'featured' ) AS DD
ON $wpdb->posts.ID = DD.post_id ";
$join .= " LEFT JOIN (
SELECT post_id, meta_value as nard_apply_date_due
FROM $wpdb->postmeta
WHERE meta_key = 'nard_ads_apply_date' ) AS naad
ON $wpdb->posts.ID = naad.post_id ";
但我的订单不正确。
我的最终SQL查询:
$orderby = " metaKey1 desc, metaKey2 desc, $wpdb->posts.post_date desc ";
我得到结果-但它具有随机顺序!我首先要有Featured_due,然后要nard_apply_date_due
感谢您的帮助。