数据库有如下表
 tb_file 
 tb_note 
 tb_note_answer 
 tb_word 下面这条语句什么意思 呢?   answ.* 代表什么?$sql = "select tb_note.*,answ.* from tb_note left join";
$sql .= " (select noan_note_id,noan_content,noan_time from tb_note_answer) as answ ";
$sql .= " on answ.noan_note_id = tb_note.note_id ";
$sql .= " order by note_time desc ";

解决方案 »

  1.   

    (select noan_note_id,noan_content,noan_time from tb_note_answer) as answ 
    给查询设了别名 answ 
      

  2.   

    (select noan_note_id,noan_content,noan_time from tb_note_answer) as answ * 表示的是该表的所有字段
    这里是noan_note_id,noan_content,noan_time
      

  3.   

    在(select noan_note_id,noan_content,noan_time from tb_note_answer) as answ
    中的所有字段,也就是tb_note_answer表中的noan_note_id,noan_content,noan_time 几个字段
      

  4.   

    select 表名.* from 表名 --查询表名的所有字段。select 表别名.* from tb as 表别名 --查询表别名对应的表或派生表的所有字段。