Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
LEFT JOIN question... Details »»
LEFT JOIN question...
Version: , by TECK TECK is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 09-26-2002 Last Update: Never Installs: 0
 
No support by the author.

i have this query:
Code:
$threads=$DB_site->query("
  SELECT * FROM thread WHERE open=1 AND open<>10 ORDER BY lastpost DESC
");
while ($thread=$DB_site->fetch_array($threads)) {
what i try to do is to associate with the $thread[userid] it's actual usergroupid. so i need to find a way to enter something like that:
Code:
if ($thread[pollid] and in_array($user[usergroupid], array(5, 6))) {
instead of:
Code:
if ($thread[pollid] and in_array($thread[postuserid], array(1, 5))) {
without adding a query. there is a way... using a JOIN.
what is the best aproach? thanks for reading this.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 09-28-2002, 07:40 AM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

and voted...
Attached Files
File Type: (21.4 KB, 14 views)
Reply With Quote
  #23  
Old 09-28-2002, 09:08 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

looks good floren
Reply With Quote
  #24  
Old 09-28-2002, 01:09 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow, 2 queries. That's sweet. The code that I use does the same thing, but I'm sure is bulkier. I'll PM you the URL to my site so you can have a look. Just keep it private.
Reply With Quote
  #25  
Old 09-28-2002, 09:34 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

np erwin, i can give you the hack... since i consider you a friend, let me know if you are interested...
"edit poll" is based on perms so a normal user who doesnt have the right to edit a poll will not see the link. also it has a link to the actual thread to discuss the poll.
i dont plan on releasing it as many other mods i have for my board...
Reply With Quote
  #26  
Old 09-29-2002, 02:05 AM
DrkFusion's Avatar
DrkFusion DrkFusion is offline
 
Join Date: Nov 2001
Posts: 1,926
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hehe you are releasing bit by biut of your site every day huh?

Its coming together well, I can see you are doing a very good job.
Keep it up, and Im sure, the majority of us are looking forward to the site.

Regards
-Arunan
Reply With Quote
  #27  
Old 09-29-2002, 08:26 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by TECK
np erwin, i can give you the hack... since i consider you a friend, let me know if you are interested...
Thanks, TECK.

The code is one of the leanest, meanest and cleanest I have seen.
Reply With Quote
  #28  
Old 09-29-2002, 01:25 PM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'l probably end up publishing my entire site backend because i'm kinda getting bored of all the questions on how it was done. I've not got a design for the new version but all the coding is done and its based on the vB3 schema.

Though you'll probably have to re-write your entire site once vB3 appears. I'm going to start making screenshots too i think.

You got an admin panel floren?
Reply With Quote
  #29  
Old 09-29-2002, 01:29 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i'm ashamed...
is the standard vb look....

since we are here... how improved is the performance in vb3, scott?
i dont know if i'm gonna upgrade... i spent to much time on code customisation on this one and optimised alot the code...
we will see...
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:31 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04442 seconds
  • Memory Usage 2,306KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (1)postbit_attachment
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete