CodeIgniter Forums

Full Version: SOLVED : Active Record DB Query Question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Unknown[/eluser]
*Love creating a post then figuring it out a half hour after.

I have been able to do the basics with the active record db structure. I am starting to need a little more out of the queries.

If I am doing a update and the query I want needs to do this:

Code:
mysql_query("UPDATE table_name SET column_name_1 = CASE id
            ".join($vals)."
            ELSE column_name_1
            END");

Can I build that with $this->db->update() somehow?

Thanks for any help you can provide.