View Full Version : Combine these 2 queries?
Boofo
08-03-2002, 09:45 PM
Can someone please tell me if the 2 following queries can be combined into one to pull out both pieces of information? And if so, how?
$popularreply=$DB_site->query_first("SELECT * FROM thread ORDER by replycount DESC LIMIT 1");
and:
$popularview=$DB_site->query_first("SELECT * FROM thread ORDER by views DESC LIMIT 1");
Admin
08-04-2002, 05:25 AM
No, they can't be.
Boofo
08-04-2002, 11:22 AM
Thanks, Chen. I kind of figured that, but thought it was worth a try.
Boofo
08-04-2002, 12:21 PM
Is there a way to keep either one of those from being viewed by users that don't have permissions to view them? Like for a private forum and have it default to a second choice that is not private forums for those who can not view them?
Admin
08-05-2002, 04:56 AM
Yes but it will add at least 3 more queries. If you want I'll give you the code.
Boofo
08-05-2002, 04:58 AM
Yes, please, would you? I want to look at it and study it. I'll go ahead and use it since my forum is not very busy yet. :)
Originally posted by FireFly
Yes but it will add at least 3 more queries. If you want I'll give you the code.
Boofo
08-06-2002, 03:49 PM
Any luck on the code yet, Chen? :)
Admin
08-06-2002, 04:25 PM
Oops, forgot. Use this function:
https://vborg.vbsupport.ru/showthread.php?s=&threadid=41934
Boofo
08-06-2002, 05:49 PM
Can't say that I haven't had others feel the same. :( :)
Thanks for the code. I'll see if I can figure out how to use it.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.