Domanda

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

È stato utile?

Soluzione

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
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top