Not showing members to a blocked member

I am trying to use the block list so members that have blocked other members do not show up.

 

SELECT `ID` FROM `Profiles` WHERE `Status` = 'Active' AND
                    `DateLastNav` > SUBDATE(NOW(), INTERVAL 1 MINUTE)  AND `ID` <> 226 AND `Avatar` <> 0 AND `Profiles`.`allow_view_to` = '3' OR `Profiles`.`allow_view_to` = '1'  AND NOT (SELECT COUNT(*) FROM `sys_block_list`,`Profiles` WHERE `Profiles`.`ID` = `sys_block_list`.`ID` AND `sys_block_list`.`Profile` = '226')  LIMIT 28

This should NOT return values where user 226 is in their block list, however it does.

SELECT COUNT(*) FROM `sys_block_list`,`Profiles` WHERE `Profiles`.`ID` = `sys_block_list`.`ID` AND `sys_block_list`.`Profile` = '226'


If I run this query, I get a 1 (which there is only 1 person blocking 226).

Any database gurus out there know what I am doing wrong?

Thanks!

http://www.mytikibar.com
Quote · 27 Jan 2014

 

members that have blocked other members do not show up

 Could you explain please little more detailed?

http://boonexpert.com
Quote · 27 Jan 2014

 

 

members that have blocked other members do not show up

 Could you explain please little more detailed?

 If a member blocks another member, it only keeps them from going to their profile.

They can see all their activity in other areas. I fixed the wall where if you are blocked, you will NOT see the person that blocked you's activity.

I fixed popular members, I fixed a couple of mods I have installed.

This one is members online.  If I am blocked, I should NOT even see you online.

So...  I have the query that displays online members.

Now, I have to add to that query.  If I blocked you, you should not even see me online.

I tested the search...  o______O  don't even get me started!  That's next.

And nvm... I figured it out!

 

AND (`Profiles`.`allow_view_to` = '3' OR `Profiles`.`allow_view_to` = '1')


I added the parenthesis' and it works!

 

http://www.mytikibar.com
Quote · 27 Jan 2014

Well, if you'll do this way, then you'll have to disable seeing online status for all non-members as well, which makes your site look little "dead" in some way.

http://boonexpert.com
Quote · 27 Jan 2014

 

Well, if you'll do this way, then you'll have to disable seeing online status for all non-members as well, which makes your site look little "dead" in some way.

 Yeah, well, you can't see anything if you are a non member so, no loss for that.

The whole thing is, if someone is blocked, the blocker should look as tho they don't exist to the blockee.

It'll take some time, but, I'm getting there!

http://www.mytikibar.com
Quote · 27 Jan 2014
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.