문제

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

도움이 되었습니까?

해결책

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
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top