Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT DISTINCT
- `identity`.`entity_id`,
- `identity`.`owner_id`,
- `identity`.`classid`,
- `identity`.`name`,
- `identity`.`deleted`,
- `identity`.`datetime`,
- `identity`.`keywords`,
- `identity`.`uniquetypekey`,
- `identity`.`sortpriority`,
- `identity`.`guid`,
- `identity`.`instancerole`,
- `identity`.`gdsrole`,
- `identity`.`gdsowner_guid`,
- `profile`.`profile_id`,
- `profile`.`profile_oid`,
- `profile`.`picture_id`,
- `profile`.`video_id`,
- `profile`.`logopic_id`,
- `profile`.`descrshort`,
- `profile`.`descrfull`,
- `accountentity`.`accountentity_id`,
- `accountentity`.`accountentity_oid`,
- `accountentity`.`accounttype`,
- `accountentity`.`registrationno`,
- `accountentity`.`vatid`,
- `accountentity`.`vatregistration`,
- `accountentity`.`vatoption`,
- `accountentity`.`vatrate`,
- `user`.`user_id`,
- `user`.`user_oid`,
- `user`.`userstatus`,
- `user`.`namefirst`,
- `user`.`namesecond`,
- `user`.`email`,
- `user`.`phone`,
- `user`.`dob`,
- `user`.`newsletter`,
- `user`.`gender`,
- `user`.`titlebefore`,
- `user`.`titleafter`
- FROM
- `identity`
- INNER JOIN
- `profile` ON `profile`.`profile_id` = `identity`.`entity_id`
- AND `profile`.`profile_oid` = `identity`.`owner_id`
- INNER JOIN
- `accountentity` ON `accountentity`.`accountentity_id` = `profile`.`profile_id`
- AND `accountentity`.`accountentity_oid` = `profile`.`profile_oid`
- INNER JOIN
- `user` ON `user`.`user_id` = `accountentity`.`accountentity_id`
- AND `user`.`user_oid` = `accountentity`.`accountentity_oid`
- WHERE
- (`identity`.`owner_id` = 12)
- AND (`identity`.`owner_id` = 12)
- AND `identity`.`deleted` = 0
- AND EXISTS( SELECT
- 1
- FROM
- `profiletypelink` AS s44t0
- WHERE
- (s44t0.`typecode` = 10)
- AND s44t0.`t_profile_id` = `profile`.`profile_id`
- AND s44t0.`t_profile_oid` = `profile`.`profile_oid`)
- AND EXISTS( SELECT
- 1
- FROM
- `profileattrlink` AS s45t0
- WHERE
- ( EXISTS( SELECT
- 1
- FROM
- `profileattrlink` AS s46t0
- WHERE (
- select 1 from `profileattribute` pattr
- where pattr.t_group_id = 2794
- and pattr.attribute_id = s46t0.t_attribute_id
- and pattr.attribute_oid = s46t0.t_attribute_oid
- )))
- AND s45t0.`t_profile_id` = `profile`.`profile_id`
- AND s45t0.`t_profile_oid` = `profile`.`profile_oid`)
- ORDER BY `identity`.`name` asc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement