在我的查询中,我想检查具有指定权限的用户是否存在。目前我正在使用下面的查询。它将检索具有指定条件的授权用户行。格式化mysql查询输出
select a.ixUserAuthorization from tblechecklistuserroleassignmentxref r
inner join tblechecklistuserrole u on u.ixUserRole=r.ixUserRole and u.sname='Initiator'
inner join tblechecklistuserauthorization a on a.ixUserAuthorization=r.ixUserAuthorization
and a.ixcustomer='1'and a.ixprogram='1'and a.ixworkpackage='1'and a.ixactivity='1' and a.ixUser='626e28e8-e67a-4d11-8d2c-129d0ab79e96';
如果任何行返回我想要显示的结果为真,如果没有行从上述查询我想要显示的结果为假返回。
如何修改以获得结果为true或false。
?如何计算选择查询结果的行数? –
在结果上使用函数mysql_num_rows() – Uttara