إنضمامك إلي منتديات استراحات زايد يحقق لك معرفة كل ماهو جديد في عالم الانترنت ...

انضم الينا
استراحات زايد الصفحة الرئيسية

         :: 100% Organic Cotton Baby Wipes – 60 Pcs (آخر رد :konouz2017)       :: فوط صحية ناعمة بالقطن العضوي | فوط صحية قوية الامتصاص | organyckw (آخر رد :konouz2017)       :: |مايونيز صحي وعضوي |من هيلثي كرفتس يصلك الى باب ا healthycrafts (آخر رد :konouz2017)       :: مذاق رائع ومقرمش لرقائق البطاطس بنكهات متنوعة -Corn Up Popped (آخر رد :konouz2017)       :: تفسير حلم اني انخطبت وانا عزباء (آخر رد :نوران نور)       :: القدم في المنام للعزباء (آخر رد :نوران نور)       :: تفسير حلم سقوط سن واحد سفلي في اليد (آخر رد :نوران نور)       :: تفسيرحلم الزواج للمتزوجة (آخر رد :نوران نور)       :: تفسير حلم دورة المياه للعزباء (آخر رد :نوران نور)       :: السياحة في مصر للعوائل (آخر رد :emad100)      

إضافة رد
 
LinkBack أدوات الموضوع انواع عرض الموضوع
  #1  
قديم 02-26-2010, 08:50 PM
عضو ماسي
بيانات محروم.كوم
 رقم العضوية : 503
 تاريخ التسجيل : Dec 2007
الجنس : female
علم الدوله :
 المشاركات : 2,100,611
عدد الـنقاط :3341
 تقييم المستوى : 2139

I'm trying to get a query to only pull usergroups that have been selected in an options menu. The setting option is named showroster_displayed_groups which I installed via a products.xml file:

Code:


free



This isn't a permission to view thing, it is more like choosing which usergroups will be displayed.

Here is the current query and it works fine, except I can't figure out how to only pull the usergroups I entered above:

PHP Code:
$users = $db->query_read_slave("

SELECT user.*, usergroup.usergroupid, usergroup.title, user.options, usertextfield.*, userfield.*,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
FROM "
. TABLE_PREFIX . "usergroup AS usergroup
LEFT JOIN "
. TABLE_PREFIX . "user AS user ON(user.usergroupid = usergroup.usergroupid OR FIND_IN_SET(usergroup.usergroupid, user.membergroupids))
LEFT JOIN "
. TABLE_PREFIX . "userfield AS userfield ON(userfield.userid = user.userid)
LEFT JOIN "
. TABLE_PREFIX . "customprofilepic AS customprofilepic ON (user.userid = customprofilepic.userid)
LEFT JOIN "
. TABLE_PREFIX . "usertextfield AS usertextfield ON(usertextfield.userid=user.userid)
"
);

I know I need a WHERE option at the end, but I just haven't had any luck with anything I've tried.

One thing I tried was to do a query on the $vbulletin->options['showroster_display_groups']:
PHP Code:
$displaygroups = explode(',', $vbulletin->options['showroster_display_groups']);

But, then I couldn't figure a way to compare that in the main query. I've also tried creating a new table in my database and then using that to compare within my query, but that just gave me database query errors.

I hate to admit it, but I'm stuck. I would appreciate any help, even a suggestion in the right direction.

Thank you for your time.
__DEFINE_LIKE_SHARE__
رد مع اقتباس
إضافة رد

مواقع النشر (المفضلة)


تعليمات المشاركة
لا تستطيع إضافة مواضيع جديدة
لا تستطيع الرد على المواضيع
لا تستطيع إرفاق ملفات
لا تستطيع تعديل مشاركاتك

BB code is متاحة
كود [IMG] متاحة
كود HTML معطلة
Trackbacks are متاحة
Pingbacks are متاحة
Refbacks are متاحة



الساعة الآن 04:00 PM


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.5.2 TranZ By Almuhajir

RSS RSS 2.0 XML MAP HTML