I tried looking for an issue on this but couldnt find it
I basically need to have an extra field in the voteapi table to store additional value. This value is not object related, it is instead a list of contents within a node and they all have a special ID to distinguish them . Does that make sense?

This is what i want to store for each vote

contend_id = usually the node ID
value = the vote count
tag = vote
value type = point
uid = user id
mycontent_id = (a single node has many of this id and i want to an individual vote for each)

Thanks

Comments

amedjones’s picture

Version: master » 6.x-2.x-dev
amedjones’s picture

I took some suggestion from IRC and was told that one way is to create a separate table and store my content_id along with the vote_id then use JOIN statements to link the two table

I am now facing problem retrieve the vote_id of new entries. Does anyone know how I can achieve this? I have tried both mysql_insert_id and db_last_insert_id() but it retrieves an ID of vote_cache_id from the votingapi_cache

amedjones’s picture

I've managed to solve the problem. if there's anyone else facing the same problem of extracting the vote_id. try the following

$result = db_query ('SELECT vote_id from {votingapi_vote} ORDER BY vote_id desc LIMIT 1');

this ticket can be closed

amedjones’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.