Nathan Coast wrote:
Hi
apologies if this is a dumb question but can you do subqueries in mysql?
select count(*) as RES from ACL_USER_GROUP_ROLE as UGR where UGR.USER_ID
=2 and UGR.ROLE_ID = (select ROLE_ID from ACL_ROLE where ROLE_NAME =
'projectmanager' )
this query fails, but the individual queries work fine
select count(*) as RES from ACL_USER_GROUP_ROLE as UGR where UGR.USER_ID
=2 and UGR.ROLE_ID = 3
and
select ROLE_ID from ACL_ROLE where ROLE_NAME = 'projectmanager'
cheers
Nathan
You need MySQl 4.1.x to do subqueries.
HTH,
Wolfram
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]