There is no from table There is no on to filter the relationship between these two tables.
SELECT zqwl_receipt.*,zqwl_custom.custom_name from zqwl_receipt LEFT JOIN zqwl_custom on zqwl_custom.field= zqwl_receipt.field WHERE zqwl_receipt.id= zqwl_custom.id
The usage of
left join
is generally to query the main table first and then join other tables, such asIf you want to combine the query results of two tables a and b and then perform a related search, you may be able to use a subquery
But if you write such a statement, you’d better think about the design issues of tables a and b,
or this is completely unnecessary
SELECT zqwl_receipt.*,zqwl_custom.custom_name from xxx LEFT JOIN xxx
from a left join b on a.id=b.id
Where did your FROM go
There is no from table
There is no on to filter the relationship between these two tables.
SELECT zqwl_receipt.*,zqwl_custom.custom_name from zqwl_receipt LEFT JOIN zqwl_custom on zqwl_custom.field= zqwl_receipt.field WHERE zqwl_receipt.id= zqwl_custom.id
Basic syntax errors