这是我试图执行的 MySQL 查询。它不断失败并出现错误:字段列表中的未知列“staff_tbl.mainrank”。这怎么可能?
DROP TEMPORARY TABLE IF EXISTS `staff_tbl`;
CREATE TEMPORARY TABLE staff_tbl(childrank TEXT, mainrank TEXT);
INSERT INTO staff_tbl
SELECT permissions_inheritance.child, permissions_inheritance.parent
FROM permissions_inheritance;
SELECT authme.username, permissions_inheritance.child,
permissions_inheritance.parent, staff_tbl.mainrank
FROM authme
INNER JOIN permissions_inheritance ON authme.username = permissions_inheritance.child
INNER JOIN staff_tbl alies2 ON staff_tbl.mainrank = permissions_inheritance.parent;
DROP TABLE `staff_tbl`;
如果您能帮助我,我将不胜感激。我把我的每一根头发都拔了出来。所以你们是我最后的希望。我还是个新手:)