select h_title_append.answer_type,h_title.id,h_temp.id " +
"tilte_no,title,h_temp.template_no from hlcd_title h_title left join " +
"hlcd_title_appendix h_title_append On h_title.id= "+
"h_title_append.title_id left join hlcd_template_title_appendix h_temp_title on h_title.id=h_temp_title.title_id left "+
"join hlcd_template h_temp on h_temp.id=h_temp_title.template_id "+
"where h_title.title_type=0 and h_title.status=1 and h_temp_title.del_status=1 and "+
"h_temp.del_status=1 and h_title_append.answer_type=1"
只能获得h_title.id的ID,获得不到h_temp.id 的ID,是什么原因呀
项目:JFinal
http://www.jfinal.com/doc/5-13
这样的代码不会有人去认真看,只能猜测: 两个表的字段重复了,需要使用 as 起个别名,例如:
select t1.ID , t2.ID as ID2