[英]Match Against and left join shows error
So I have two tables like this, first table ( ) and second table ( ) 所以我有两个这样的表,第一个表( )和第二个表( )
* *
So, it's possible to do this? 那么,有可能这样做吗?
Your FROM
table list and JOINs
must come before the WHERE
clause of the query. 您的
FROM
表列表和JOINs
必须位于查询的WHERE
子句之前。
I don't know if the rest of the query was right, but this is it in the right order: 我不知道其余的查询是否正确,但这是正确的顺序:
SELECT id_maestro, nombre, materia
FROM maestros_detalle AS t1
LEFT JOIN (SELECT id, up, down FROM maestros) AS t2 ON t1.id_maestro = t2.id
WHERE MATCH (t1.nombre, t1.materia)
AGAINST ('quimica' IN BOOLEAN MODE)
ORDER BY t1.id_maestro
Cleaned up: 清理:
SELECT
t1.id_maestro,
t1.nombre,
t1.materia,
t2.up,
t2.down
FROM
maestros_detalle t1
LEFT JOIN
maestros t2
ON
t1.id_maestro = t2.id
WHERE
MATCH(t1.nombre, t1.materia) AGAINST ('quimica' IN BOOLEAN MODE)
ORDER BY
t1.id_maestro
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.