PDA

View Full Version : Weekly Top / Daily Top


05-29-2000, 08:23 PM
Hi there,

Any ideas on how I could use the templates and NOT PHP code to generate the weekly stats?

Essentially when a topic is read, I want to make a couple of SQL calls to update a weekly counter for that particular topic.

Shri

05-30-2000, 01:27 AM
You can't make a SQL call via a template... templates have to be text (the header & footer are a different story, they can optionally be php)

SQL calls require some sort of executed code. So your options would be to either use the header as PHP, which is explained in the user guide, then put the code in there to update a variable, which you could then post in a template...

or just hack the php code.

The first one is doable, but is messy. I would say the second option is better.

As far as the actual calls you will need, I dont know them. I have just started setting mine up, and havent learned the dbase structure yet... anyone else care to help with that?