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

Popular posts from this blog

Using Android Volley to post an array to PHP -

python - How to add an model instance to a django queryset? -

angularjs - No 'Access-Control-Allow-Origin' error from local domain to public API -