|
From: Todd L. M. <tm...@ha...> - 2000-11-22 04:17:54
|
I'd prefer not to generate the nodes list every time the hubs and nodes page is visited, because right now it would involve doing a lot of work in PHP. The last time I tried to code something where the incoming links would be cached was an utter disaster. So -- do you have any ideas for nifty database tricks to make the job easier/faster? The basic problem is counting how many rows in the 'links from' column have a topic in them, for every page in the wiki. I'd like to do this entirely in the database, if possible. At first I thought nested queries might do the trick, but it looks like MySQL doesn't support them yet, and that they may not be recursive/iterative. I have figured out how to make the database count the number of links into a specific topic, but not how to make entering that into the row a single query, which would be nice. It would be even nicer if there were some way to tell it to peform that query on every update to the table. Anyway, any ideas on this? The other idea I had was to more-or-less brute-force it in PHP -- on every save, use the above query to count incoming links. If it's in the top ten, store it into a top-ten table and drop the lowest. Thanks for any help. -jQuinn |