smart info display

Results 1 to 3 of 3

Thread: smart info display

  1. #1
    Join Date
    Dec 1969

    Default smart info display

    I was posed with the question the other day, regarding how I would use ASP to displayed customized information to a logged in user depending on what type of information they had looked at during previous visits to the site (i.e. particular software products). Do you know in general terms how I might be able to implement such a scheme?<BR><BR>Thanks in advance for your help!!<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: smart info display

    well depending if the customer visits the web site 50% fo the time for product x then have a db that contains the percentages for the products and then make a dynamic list box or what ever depending on those variables in the db for that user(customer)<BR><BR>(or you could possibly use cookies to do the same thing but then you couldn&#039;t find out the percentages of items visited for the retailer )

  3. #3
    Join Date
    Dec 1969

    Default How smart does it need to be?

    It would be easy enough to have an extra table in your DB, linked to customers by custID, that simply stores the pages/products/whatever previously visited.<BR><BR>To keep the number of entries for a given user from growing without bounds, you could throw away the oldest one before adding a new one if the count for that user exceeded/matched your limit.<BR><BR>Assuming you have cached the users custID:<BR><BR>&#060;%<BR>SQL = "SELECT Count(*), Min(when) FROM lookedAt WHERE custID = " & custID<BR><BR>Set RS = Conn.Execute(SQL)<BR>cnt = RS(0)<BR>when = RS(1)<BR>RS.Close<BR>If cnt &#062;= 10 Then<BR> SQL = "DELETE FROM lookedAt WHERE custID=" & custID & " AND when=&#039;" & when & "&#039;"<BR> conn.Execute(SQL)<BR>End If<BR>SQL = "INSERT INTO lookedAt (custID,prodID,when) " _<BR> & "VALUES(" & custid & "," & prodID & ",GetDate())"<BR>conn.Execute(SQL)<BR>%&#062;<BR>< BR>Naturally, you could convert all that into a stored procedure.<BR><BR>Anyway, to then figure out what to present to the customer you&#039;d do:<BR><BR>&#060;%<BR>SQL = "SELECT prodID,Count(*) FROM lookedAt WHERE custID=" & custID _<BR> & " GROUP BY prodID ORDER BY Count(*)"<BR>Set RS = conn.Execute(SQL)<BR>Do Until RS.EOF<BR> ... show the info for RS("prodID") ...<BR> RS.MoveNext<BR>Loop<BR>%&#062;<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts