我有两张桌子。 民意调查和民意调查。需要加入和两个表格并获得" polllike "," poll_like1 "," poll_like2 "," poll_like3 "和" poll_like4 " Poll_likes 表格中的列以及投票表格中的所有列。
我尝试过以下查询,但无法获取所有记录。
SELECT * FROM poll_likes t LEFT JOIN polls c on c.phonenumber = t.user_Id WHERE t.`poll_id` = c.id