Welcome Guest, Not a member yet? Register   Sign In
active record CONCAT
#1

[eluser]NZmuzzer[/eluser]
Anyone know how to CONCAT an existing text field with new text using Active Record? Is this possible?

I'll explain that a little better. I have a field in one of my tables called "log" which has existing text in it, and I wish to append text such as "updated on 12 Feb 08" to the end of this field. I know I could query the database to return the record and extract the field text, and then update the table it with the new concatanated text, but that seems an awful long way of doing something simple.

I believe I can do something like
Code:
$this->db->set('field', 'field+1', FALSE);
for numeric fields, but how about text?


Messages In This Thread
active record CONCAT - by El Forum - 02-12-2009, 02:24 AM
active record CONCAT - by El Forum - 02-12-2009, 03:19 AM
active record CONCAT - by El Forum - 02-12-2009, 07:51 AM
active record CONCAT - by El Forum - 02-12-2009, 02:11 PM



Theme © iAndrew 2016 - Forum software by © MyBB