The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How could I display total # of subscribers? Help Please
I use the paid subscriptions feature to help cover a majority of the financial burden my forum generates and I'd like to be able to display somewhere in the header the total number of subscribers.
Basically I'd like to have just a small little space say "Current Subscribers X, Goal 120" Where X is pulled automatically like it is from the Subscriptions Manager tab in the AdminCP If anyone can help on this one I'd greatly appreciate it. Thanks! |
#2
|
|||
|
|||
Can any of you code geniuses out there help me out with this?
|
#3
|
||||
|
||||
[sql]select count(*) from subscriptionlog where status=1[/sql]
|
#4
|
|||
|
|||
Quote:
How will running that query allow me to call the value in the header template? |
#5
|
||||
|
||||
Well, just execute it
global_start PHP Code:
|
#6
|
|||
|
|||
Quote:
I attempt to run the query but it gives me the following error Quote:
|
#7
|
|||
|
|||
Then you are probably using a table prefix, and will have to add that in front of tablenames.
|
#8
|
|||
|
|||
Quote:
An error occurred while attempting to execute your query. The following information was returned. error number: 1054 error desc: Unknown column 'active' in 'where clause' Any thoughts? |
#9
|
|||
|
|||
What is the exact query you are running?
If you are using a table prefix, and are referencing the tablename as identifier for a columnname anywhere the SQL-statement, you should also add an AS clause. Example: PHP Code:
|
#10
|
||||
|
||||
My fault - it's status not active
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|