A client's site consists of a few cf templates that generate dynamic
content from an SQL Server 7.0 db.
The application is similar to a "yellow pages" application where the
visitor will:
1. look up products/services and providers from the db based on some search
criteria
2. navigate (next and prev) through a list of candidates which match the
search
3. Select candidate(s) for detail display
4. Link to the candidate(s) web site
My client wants to maintain detail statistics for each product
provider, but traditional page logs are no good because our pages
contain dynamic content.
The client also wants to log each time a product or provider was a
"candidate" (matched the search criteria) even though it was not
selected for detail display or linked.
So, he will be able to say to Provider A:
1000 visitors did a search where you were a candidate (step 1 & 2)
30 visitors selected your record for view (step 3)
7 visitors linked to your site (step 4)
I can easily log items 3 & 4 by updating "displayed" and "linked"
totals in the db whenever these activities take place.
But, I also want to update each time any provider was a candidate
(matched the initial search).
I could do this by looping thru the search results:
Rereading (exclusive) and updating the "candidate" field in each record
OR
Inserting a record (probably just a provider ID)into a separate stats table
to indicate that this provider was a candidate. (Periodically, these would be
counted by Provider, and the total would be used to update the "candidate"
total in the Provider record.
I was hoping to use sprocs or triggers to accomplish this in the most
efficient way possible.
It appears that a trigger can't be used because it can't be invoked
by a SELECT event?
Any ideas on how to do this without bringing the db to its knees?
TIA
Dick
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.