multiple user interaction

Results 1 to 3 of 3

Thread: multiple user interaction

  1. #1
    Rob Guest

    Default multiple user interaction

    How would you go about implementing a system where several users could<BR>leave feedback about several other users but only one time?<BR> <BR>In other words, once user A leaves feedback for user B, user A can never <BR>leave feedback for user B ever again.<BR> <BR>Bear in mind we are talking about thousands of people.<BR> <BR>Thanks,<BR> <BR>Rob Taylor<BR>Cartography Today<BR>Custom Made Internet Mapping Applications<BR>Employing ASP<BR><BR>208-882-9398<BR><BR>

  2. #2

    Default RE: multiple user interaction

    Hey Rob,<BR><BR>I would do something along the same lines as a password. I am guessing you are using a db of some form or another.<BR><BR>SELECT * FROM user_feedback WHERE user_id = &#039B&#039 AND user_reply_id = &#039A&#039<BR><BR>If RS.BOF and RS.EOF Then<BR> &#039user A has never posted anything about user B<BR> &#039insert crap here<BR>Else<BR> &#039user A has already written junk about user B<BR> Response.Write ("Hey you bonehead!, you already posted junk about this person.")<BR>End If<BR><BR>HTH,<BR>DRUG_DEALER<BR>...ArcView Rules!

  3. #3
    Chris Gwinn Guest

    Default RE: multiple user interaction

    This is sort of an ugly problem, since you can potentially end up with 1000s x 1000s of relations. You&#039ll want to make sure you have a real database on your back end.<BR><BR>Anyway, the previous answer should work fairly well, although you might want to make your database key the concatenation of the two user&#039s unique IDs, instead of using two separate keys. This way, you&#039ll be able to check on a single indexed key and not have to AND reviewer and reviewee columns. <BR><BR>So:<BR><BR>lstrFeedbackKey = lstrCommenterID & lstrSubjectID<BR><BR>SELECT * FROM user_feedback WHERE user_id = lstrFeedbackKey<BR><BR>I&#039m assuming you&#039ll be storing feedback (or its location) in the database as well. Depending on what percent of your responses you expect to be duplicates, you might have better performance trying an immediate insert of the feedback and then evaluating the response (ideally from the return code of your stored procedure). Instead of doing a select for every user and then an insert for X% of them, you&#039ll do an insert for every user and an error message for 100-X% of your users. If you have 10,000 attempts at feedback, 90% of which are legal, you&#039ll trade 10k unneeded selects for 1k unneeded inserts. Depending on your database, this could be a good deal. If you use a stored procedure, you could use this method initially, when there are few comments (and repeated ones are less likely), and then change to a select, then insert implementation as your table fills up.<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