Welcome Guest, Not a member yet? Register   Sign In
Urgent help with multiple updates in DB, please!
#4

[eluser]Sumon[/eluser]
Ops!! the my former thought is totally wrong. because you loop $_POST['id'] inside outer loop. So without any doubt $the_id should be the last value of the hidden field.
Change your code as
Code:
$i=0;
foreach ($_POST['desc'] as $desc) {

        $the_id = $_POST['id'][$i++];
              
        ///////////////////////////////////////////////////////////
        //
        //  Put the incoming date in variables
        //
        ///////////////////////////////////////////////////////////

        $data = array(
                           'aco_desc'     => $desc
                );
                
        ///////////////////////////////////////////////////////////
        //
        //  Delete the selected feed
        //
        ///////////////////////////////////////////////////////////
          
         $this->db->where('aco_owner', $owner);  
         $this->db->where_in('aco_id', $the_id);  
           $this->db->update('fe_albums_content', $data);
          
           }
now lets see what's happening.


Messages In This Thread
Urgent help with multiple updates in DB, please! - by El Forum - 10-04-2008, 07:57 AM
Urgent help with multiple updates in DB, please! - by El Forum - 10-04-2008, 09:54 AM
Urgent help with multiple updates in DB, please! - by El Forum - 10-04-2008, 10:07 AM
Urgent help with multiple updates in DB, please! - by El Forum - 10-04-2008, 11:20 AM
Urgent help with multiple updates in DB, please! - by El Forum - 10-04-2008, 11:28 AM
Urgent help with multiple updates in DB, please! - by El Forum - 10-04-2008, 04:15 PM
Urgent help with multiple updates in DB, please! - by El Forum - 10-04-2008, 11:34 PM
Urgent help with multiple updates in DB, please! - by El Forum - 10-05-2008, 03:30 AM
Urgent help with multiple updates in DB, please! - by El Forum - 10-05-2008, 02:45 PM



Theme © iAndrew 2016 - Forum software by © MyBB