我想按第一个表第1列的顺序选择左连接第2表的所有表字段

时间:2016-06-02 11:01:15

标签: codeigniter

代码

 $getQueList = mysql_query("SELECT * FROM questions_master order by questions_master.question_id desc LEFT JOIN users_master ON questions_master.userId = users_master.userId ");

我想根据questions_master.question_id按降序获得结果

1 个答案:

答案 0 :(得分:0)

以下是您必须使用的查询以降序获取结果questions_master.question_id

SELECT * 
FROM questions_master 
LEFT JOIN users_master 
ON questions_master.userId = users_master.userId 
ORDER BY questions_master.question_id desc

最后是订购条款。