Welcome Guest, Not a member yet? Register   Sign In
How to increment DB Column value using Active Record Class
#1

[eluser]sheri.nust[/eluser]
Hey ,

I want to update my DB column, for this i have successfully run the following query.
and updated column "TotalMembers" by 1.

But now i want to do this using Active Record Class in CI,
Can anyone help me how i have to do this?

Code:
UPDATE
   GBSociety  
     SET TotalMembers=TotalMembers+1  // incremented by 1 or some value e,g ,10,12. etc
     WHERE SocietyID=$pSocietyID;
#2

[eluser]jedd[/eluser]
Does [url="http://ellislab.com/forums/viewthread/62630/"]this thread[/url] help?




Theme © iAndrew 2016 - Forum software by © MyBB