|
إنضمامك إلي منتديات استراحات زايد يحقق لك معرفة كل ماهو جديد في عالم الانترنت ...
انضم الينا
#1
| ||
| ||
I am trying to find users who have had one subscription but not the other. I am using this query to locate one of the subscription types: SELECT username FROM subscriptionlog LEFT JOIN user ON (user.userid = subscriptionlog.userid) WHERE subscriptionid = 6 AND status = 0 AND usergroupid = 2 Now out of this group I need to find ONLY the users who have NOT had subscriptionid = 1. Basically, if there userid exists in subscriptionlog more than once (indicating more than one subscription has existed for the user) I don't want the username returned. ONLY users who have had subscriptionid 6 and NOT 1. Any help would be greatly appreciated! __DEFINE_LIKE_SHARE__ |
مواقع النشر (المفضلة) |
| |
المواضيع المتشابهه | ||||
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
mysql query | محروم.كوم | منتدى أخبار المواقع والمنتديات العربية والأجنبية | 0 | 05-11-2010 09:30 PM |
MySQL slow query | محروم.كوم | منتدى أخبار المواقع والمنتديات العربية والأجنبية | 0 | 04-03-2010 12:30 PM |
CMS Need help - MySql Query to fix author name errors | محروم.كوم | منتدى أخبار المواقع والمنتديات العربية والأجنبية | 0 | 03-23-2010 03:10 AM |
vB crashes MySQL on one really* really long query. | محروم.كوم | منتدى أخبار المواقع والمنتديات العربية والأجنبية | 0 | 09-27-2009 08:10 PM |
vB crashes MySQL on one really* really long query. | محروم.كوم | منتدى أخبار المواقع والمنتديات العربية والأجنبية | 0 | 09-27-2009 07:50 PM |