如何在我的 sql 语句中创建 Order By?我已经尝试过这样的声明,但这不起作用。每次我运行它都会崩溃。是因为我的 $_GET['email'] 吗?我究竟做错了什么?
$results = $this->EE->db->query(
"SELECT ct.*, t.*, em.*, cd.*
FROM transactions as t
Inner JOIN exp_channel_titles as ct on (t.restaurant_id = ct.entry_id)
Inner JOIN exp_channel_data as cd on (ct.entry_id = cd.entry_id)
inner join exp_members as em on (t.cardid-10000000 = em.member_id)
WHERE ct.title = '".$_GET['email']."'ORDER BY t.created DESC");