hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : vbulletin query question
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

vbulletin query question

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 02-22-2003, 07:46 AM
Domenico Domenico is offline
Premium Member
 
Join Date: Dec 2000
Location: Lowlands
Posts: 716

vbulletin query question


Since the great minds at vbulletin.org don't answer this question I will try my luck here.

I want to change the following code in index.php:

$getnewthread=$DB_site->query_first("SELECT COUNT(*) AS threads FROM thread WHERE lastpost > '$bbuserinfo[lastvisit]'");

$getnewpost=$DB_site->query_first("SELECT count(*) AS posts FROM post WHERE dateline > '$bbuserinfo[lastvisit]'");

I want to exclude two forums from these queries, how?
Thank you!

Reply With Quote


Sponsored Links
  #2  
Old 02-22-2003, 08:36 AM
Rich2k Rich2k is offline
Web Hosting Master
 
Join Date: May 2002
Location: UK
Posts: 2,994
I've never tried this myself but this may work

$getnewthread=$DB_site->query_first("SELECT COUNT(*) AS threads FROM thread WHERE lastpost > '$bbuserinfo[lastvisit]' AND forumid <> [FORUMID]");

where you replace [FORUMID] with the id number of the particular forum you don't want (get the id from the query string of a particular forum.

You shouldn't need to edit the second sql statement as I would expect that is only executed as part of the first loop (without looking into the vBulletin code)

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Alert Logic Releases New Version of Security and Compliance Solution Web Hosting News 2013-02-19 15:55:16
Joomla Hosting Study Shows Speed, Uptime Top Selling Points of a Web Host Web Hosting News 2012-11-07 15:06:36
cPanel Conference 2012: Social Media for Customer Service with Mario Rodriguez Web Hosting News 2012-10-10 15:12:10
Rackspace Blog Looks at Easy Outsourcing for App Development Blog 2012-03-05 19:07:48
Web Host 1&1 Launches Domain Registration Mobile App Web Hosting News 2011-11-02 21:05:55


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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 Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?