I personally prefer voting mechanisms that display how many votes have 
been cast. If you keep the thumbs_up separate from thumbs_down, you can 
figure the total number of votes. Otherwise, you will not be able to 
know whether the author is *really* average or just never voted for.

Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]

On Saturday, February 23, 2002, at 11:45  AM, Erik Price wrote:

>
> On Saturday, February 23, 2002, at 02:42  PM, Nick Wilson wrote:
>> I'd like to add a simple 'thumbs up, thumbs down' vote mechanism to it.
>> The (simplified) table looks like this:
>>
>> id | authId | title | tip
>>
>>
>> The only way I've come up with so far is to add two more fields
>> (thumbs_up and thumbs_down). Then....
>>
>> each time someone votes...
>> get the current value of the field (say thumbs_up)
>> use php to increment it's value and
>> pop it back in the db.
>
> What if you made the field a signed INT field, and used PHP to subtract 
> one from the current value of the field every time someone chose 
> "thumbs down" or add one to the current value of the field every time 
> someone chose "thumbs up".  This way you could have a "level" of how 
> well the author stacks up.
>
> This is just another idea shooting the moon, the truth is that it would 
> probably be fine either way.  A matter of personal preference.
>
> Erik
>
>
>
>
>
> ----
>
> Erik Price
> Web Developer Temp
> Media Lab, H.H. Brown
> [EMAIL PROTECTED]
>
>
> -- PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to