MySQL Query

To be honest, MySql is NOT my strong suit, so, I need some help with a query if anyone would like to tackle it.

If it has to be PHP, then I can do that, I am just hoping to do this query with MySql only.

 

Basically I have the site wall mod installed, and it shows EVERYONE's posts on the wall.  What I want is to query the database and only show mine or my friends queries.

 

I was trying something on the line of....

 

SELECT * FROM `bx_wall_events` LEFT JOIN `sys_friend_list` ON `bx_wall_events`.`id` = `sys_friend_list`.`ID` OR `bx_wall_events`.`id` = `sys_friend_list`.`Profile` WHERE `bx_wall_events`.`id` = '8' LIMIT 0,60

But that is not turning out so great.

 

I am trying to look at the wall and my  friends list,  only pulling mine or anyone in my friend's list posts.  Also, the 'Check' field has to be true as well.

 

IDK if this needs to be looped in PHP and compare each record or there is such a way to query the database.

 

I appreciate anyone's time they take to solve this.

 

Thanks!

 

 



http://www.mytikibar.com
Quote · 19 Mar 2012
 
 
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.