我在创建mysql查询时遇到问题。有点复杂,但我会尽力说清楚。我有四个表,如:
我有三个已知值
disrict(id),block(id),village(id)from table disrtrictlist blocks village
首先,我想从这三个表中获取这三个字段,然后我想在farmer_details表中找到这三个值。如果您理解并有任何建议请提供帮助。
我写这些查询,但它对我不起作用: -
select
farmer_name,
father_name,
district,
centre,
land,
farmer_details.village,
mobile
from farmer_details
,disrtrictlist
,blocks
,village
WHERE disrtrictlist.name_id LIKE '6'
AND ( blocks.id LIKE '53' and village.id LIKE '2')