Welcome Guest, Not a member yet? Register   Sign In
updata 'row +1'
#2

[eluser]JHackamack[/eluser]
Have you tried echoing out your query with:
Code:
echo $this->db->last_query();
to ensure that the code is proper mysql?

Another way you can do it is using:
Code:
$this->db->query('UPDATE the_table SET the_field = the_field + 1 WHERE [your WHERE clause]');
In my opinion this looks a little cleaner, but thats just my opinion.


Messages In This Thread
updata 'row +1' - by El Forum - 12-17-2010, 06:22 PM
updata 'row +1' - by El Forum - 12-17-2010, 07:07 PM
updata 'row +1' - by El Forum - 12-18-2010, 03:32 AM
updata 'row +1' - by El Forum - 12-18-2010, 07:43 AM
updata 'row +1' - by El Forum - 12-18-2010, 01:41 PM



Theme © iAndrew 2016 - Forum software by © MyBB