Author |
Topic |
pitstraight
New Member
Australia
82 Posts |
Posted - 03 February 2008 : 19:10:57
|
Anyone ?< |
|
|
muzishun
Senior Member
United States
1079 Posts |
Posted - 04 February 2008 : 01:31:58
|
See my suggestion above. It wouldn't make a difference whether the feature was only available to you or everybody on your forum, as the bloat is on the database side of the equation rather than the user side. However, the concept is certainly plausible, and the method I described above should work to do what you're wanting.< |
Bill Parrott Senior Web Programmer, University of Kansas Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com) Personal Website (www.chimericdream.com) |
|
|
cripto9t
Average Member
USA
881 Posts |
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 04 February 2008 : 09:03:41
|
quote: Originally posted by muzishun
If you want to go that route, here's how I would do it: create a new table, TOPIC_VIEWS, and store all of the information there. For fields, I'd have something like VIEW_ID (just so there is a unique key), TOPIC_ID, and VIEW_TIME.
Then you could query the table as you wanted to get results for different time frames. It adds some overhead to the forum, but I suppose the tradeoff depends on how busy your forum is or how beefy your server. As AnonJr mentioned, this table will bloat your DB in a hurry, since every time someone reads a topic (thousands of times a day on forums like this one), there's an associated DB entry.
I'll ditto that. Its pretty much the same thing I was thinking of. I had intended on putting something quick together this weekend, but things got busy... < |
|
|
pitstraight
New Member
Australia
82 Posts |
Posted - 05 February 2008 : 22:46:05
|
cripto9t, how are you going with it ? I've had a quick look at those links that you posted but they don't make a lot of sense to me. I'm not a code monkey by any stretch.< |
|
|
muzishun
Senior Member
United States
1079 Posts |
Posted - 06 February 2008 : 02:06:40
|
I'll make the same tentative offer as the other thread. If I wind up having tomorrow off due to the snowstorm, I will try and write something up for this.< |
Bill Parrott Senior Web Programmer, University of Kansas Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com) Personal Website (www.chimericdream.com) |
|
|
cripto9t
Average Member
USA
881 Posts |
Posted - 06 February 2008 : 10:17:40
|
I've got the basics working. I decided to update the records by the day. It will cut down on the entries a bit.
This is the db setup I have so far
I might drop the identity column because, right now, I don't see no need for it. I also plan to knock the date down to 8 characters to store just (year,month,day), because the time is irrelevent.
Heres the code in topic.asp to update the counts.
And this is what I've come up with to pull the records
Let me say that query will not work in older versions of mysql and I have no idea if it will work with access. Anyway it's testing fine with mysql 5 and ms sql server express.< |
_-/Cripto9t\-_ |
|
|
muzishun
Senior Member
United States
1079 Posts |
Posted - 06 February 2008 : 12:12:24
|
Cripto, it looks like we're trading back and forth on the same stuff. I'm also planning on tackling this, now that I have the day off work. I think we're approaching it from slightly different angles, so it shouldn't conflict - just add options.< |
Bill Parrott Senior Web Programmer, University of Kansas Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com) Personal Website (www.chimericdream.com) |
|
|
cripto9t
Average Member
USA
881 Posts |
Posted - 06 February 2008 : 15:58:42
|
Like I said in the other post, I don't have the time to work on these right now. A storm blew through here last night and took out 2 of my trees. There are 3 down in my grandmothers yard. So I'll be busy the next few days cutting next winters firewood.< |
_-/Cripto9t\-_ |
|
|
pitstraight
New Member
Australia
82 Posts |
Posted - 06 February 2008 : 23:08:09
|
Ah yes, "by day" sounds good as well.
Thanks guys, all help appreciated ..... and cripto9t, good luck with the wood cutting < |
|
|
pitstraight
New Member
Australia
82 Posts |
Posted - 12 February 2008 : 19:45:15
|
Any progress on this one ?< |
|
|
muzishun
Senior Member
United States
1079 Posts |
Posted - 13 February 2008 : 01:11:56
|
I haven't made any progress yet. The Post History mod took up more time than I expected it to. I may be able to work on this over the next week or so. Something tells me it will be a little more complex than it seems on the surface, but we shall see.< |
Bill Parrott Senior Web Programmer, University of Kansas Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com) Personal Website (www.chimericdream.com) |
Edited by - muzishun on 13 February 2008 01:12:10 |
|
|
pitstraight
New Member
Australia
82 Posts |
Posted - 27 February 2008 : 02:44:28
|
* bump *< |
|
|
cripto9t
Average Member
USA
881 Posts |
Posted - 27 February 2008 : 08:22:51
|
pitstraight, I haven't had much time to put into this lately, but I'm almost finished. Just a few more issues to work out. Hopefully I'll have it ready by this weekend.
Also like I stated before, I have no idea if the db query will work with an access db and I know it won't work with older versions of mySql. I'm testing with mySql 5 and MSSql7. Just to let you know . < |
_-/Cripto9t\-_ |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 27 February 2008 : 08:39:22
|
Last I checked, the bigger issues usually run into are things like TOP vs. LIMIT - but if you use the TopSQL() function Snitz has built in you can neatly avoid that problem.
The only other issues I've seen are using reserved words as field names.
Just my 2 cents (USD). < |
|
|
Topic |
|