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

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -