Welcome Guest, Not a member yet? Register   Sign In
SQL: SET column1+=value
#2

[eluser]bigbusty[/eluser]
I don't think you can do it this way. You have to update the latest value.

Another thing i thought of could be, just adding a record with "numHelpful" or "numNotHelpful". This way you dont have to get the latest value but instead you could just echo out the count of records. After the vote has expired, you could clear the table.


Code:
$this->db->insert('vote', 'numHelpful');
echo $this->vote_model->get('numHelpful');


Messages In This Thread
SQL: SET column1+=value - by El Forum - 01-03-2013, 12:24 AM
SQL: SET column1+=value - by El Forum - 01-03-2013, 01:13 AM
SQL: SET column1+=value - by El Forum - 01-03-2013, 01:41 AM
SQL: SET column1+=value - by El Forum - 01-03-2013, 02:28 PM



Theme © iAndrew 2016 - Forum software by © MyBB