tags:

views:

28

answers:

0

Hello all, i want to count total no of votes of a object with condition(given below):

  1. Initially if user is voting up then total votes increased by +2 and after few time if same user is voting down on same object then total votes decreased by -4.

  2. Initially if user is voting down then then total votes decreased by -2 and afte few time if same user is voting up on same object then total votes increased by +4.

normally for vote up and for vote down votes become +2 and -2 resp.

Table columns are :

PK_ID , FK_OBJECT_ID , VOTES(true or false) , FK_TYPE_ID(for object 100) , FK_ OWNER_ID