Welcome Guest, Not a member yet? Register   Sign In
Multi-table write with single query - is it possible?
#1

[eluser]seanloving[/eluser]
I can perform a multi-table read like this...
Code:
$this->CI->db
            ->select( " customer_id,
                        customer_type,
                        organization_name,
                        CONCAT( lastname, ', ', firstname ) AS contact,
                        CONCAT( organization_city, ', ', organization_state ) AS location,
                        organization_telephone,
                        organization_email",
                        FALSE)
            ->from('organizations')
            ->join('customers', 'customers.organization_id = organizations.organization_id', 'left')
            ->join('contacts', 'contacts.contact_id = customers.contact_id', 'left')
            ->group_by('organization_name')->get()->result_array();
but how can I UPDATE in a single query ??

Thanks
Sean Loving


Messages In This Thread
Multi-table write with single query - is it possible? - by El Forum - 02-16-2010, 01:26 PM
Multi-table write with single query - is it possible? - by El Forum - 02-16-2010, 01:50 PM
Multi-table write with single query - is it possible? - by El Forum - 02-16-2010, 02:02 PM
Multi-table write with single query - is it possible? - by El Forum - 02-17-2010, 09:50 PM



Theme © iAndrew 2016 - Forum software by © MyBB