Unknown column 'modules.modules_id' in 'on clause' [closed]
-
27-05-2021 - |
Frage
here is the sql codes
SELECT
roles.role_id,
usertype_module.role_id,
usertype_module.viewable,
usertype_module.editable,
usertype_module.createable,
modules.modules_id,
usertype_module.modules_id,
modules.modules,
roles.role_name
FROM
modules ,
roles
INNER JOIN usertype_module ON roles.role_id = usertype_module.role_id AND usertype_module.modules_id = modules.modules_id
and this error showed Unknown column 'modules.modules_id' in 'on clause'
pls help me thanks
Lösung
Might be a mistake in the query. Is this what you are trying to do:
SELECT
roles.role_id,
usertype_module.role_id,
usertype_module.viewable,
usertype_module.editable,
usertype_module.createable,
modules.modules_id,
usertype_module.modules_id,
modules.modules,
roles.role_name
FROM
roles
INNER JOIN usertype_module ON roles.role_id = usertype_module.role_id
INNER JOIN modules ON usertype_module.modules_id = modules.modules_id
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow