0
I am using Codeigniter in my application, what I need to do is the following I have in my database a field with name stock, this field is whole value, I need to do the following when I perform a sale it will have to decrease the amount of my sale of that field, in PHP would look something like this.
$sql = mysql_query( sprintf( “UPDATE profile_posts SET cliks = cliks + 1 WHERE id = %d” , $id ) )
or die( mysql_error( ) );
Is there a Codeigniter feature that I can do this or will have to do a specific SQL for it: