【发布时间】:2018-08-18 19:19:21
【问题描述】:
这是我的模态查询
SELECT COUNT(IF(n.status='0',1, NULL)) as counter, n.notify_from, n.notify_to, n.status, n.notify_text, n.notify_id, n.notify_type, n.notify_time, r.user_name, r.user_image, r.user_gender FROM `notifications` AS n JOIN register r ON n.`notify_from` = r.unique_user_name WHERE n.`notify_to` = 'IzaazG' AND n.`notify_type` = '6' GROUP BY n.`notify_from` ORDER BY n.`notify_id` DESC
从此查询中我无法从通知表中获取最后一条记录。
【问题讨论】:
-
“最后一个”是什么意思?结果是你得到了什么,而不是你想要得到什么? “模态查询”是什么意思?
-
我正在使用 codeigniter,为什么我使用了 modal 这个词,第二个是最后一条记录意味着我无法获得通知表的 MAX id..谢谢。
标签: mysql database codeigniter