unemployment Posted September 20, 2011 Share Posted September 20, 2011 Here is the scenario…. I need to add in…. AND user_actions.action_id != 15 AND user_actions.action_id != 24 But when I do that it removes my welcome message / or my welcome back message and I need that to only occur for when friend.id != {$uid} SELECT users.id, users.firstname, users.lastname, users.username, '' AS companyid, '' AS industry, '' AS stage, '' AS companytag, friends.gender, users.accounttype, users.country, users.state, users.city, UNIX_TIMESTAMP(`user_actions`.`time`) AS `approve_date`, friends.id AS FeedId, friends.firstname AS FeedFirstName, friends.lastname AS FeedLastName, friends.username AS FeedUserName, GROUP_CONCAT(actions.actionsdescription SEPARATOR '~') AS `action_id`, GROUP_CONCAT(user_actions.details SEPARATOR '~') AS `details` FROM users INNER JOIN partners ON partners.user_id = users.id AND partners.approved = 1 INNER JOIN users friends ON partners.friend_id = friends.id INNER JOIN user_actions ON user_actions.user_id = friends.id INNER JOIN actions ON user_actions.action_id = actions.id WHERE users.id = ${uid} AND `user_actions`.`time` < '${time}' GROUP BY users.id, users.firstname, users.lastname, users.username, companyid, industry, stage, companytag, friends.gender, users.accounttype, users.country, users.state, users.city, approve_date, FeedId, FeedFirstName, FeedLastName, FeedUserName Quote Link to comment https://forums.phpfreaks.com/topic/247516-remove-user-actions-when-friendid-uid/ Share on other sites More sharing options...
fenway Posted September 20, 2011 Share Posted September 20, 2011 What? Quote Link to comment https://forums.phpfreaks.com/topic/247516-remove-user-actions-when-friendid-uid/#findComment-1271145 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.