php - Script inserts the same values to the database -
php - Script inserts the same values to the database -
when run code, fields updated mysql table reason same value.
$query = $this->connection_model->get_custom_db('sender')->get($sender_table); foreach ($query->result() $row) { $data = array( $sender_row => $row->$sender_row ); $this->connection_model->get_custom_db('receiver')->update($receiver_table, $data); } print_r($data) returns:
array ( [strasse] => pantherstr. ) array ( [strasse] => minimalweg ) array ( [strasse] => blankeneser weg )
how can prepare this?
looks $ many in $row->sender_row:
$query = $this->connection_model->get_custom_db('sender')->get($sender_table); foreach ($query->result() $row) { $data = array( $sender_row => $row->sender_row ); $this->connection_model->get_custom_db('receiver')->update($receiver_table, $data); } php mysql arrays codeigniter
Comments
Post a Comment