Here is what I would like to do
function edit_save($data, $post_id, $user_id) { $this->db->where('post.user_id', $user_id); $this->db->where('post.post_id', $post_id); $this->db->join('data', 'post.data_id_fk = data.data_id', 'left'); $this->db->update('post', $data); }
The "post" column must be connected to the "data".
When I run above, I get an SQL error saying that one of the fields from the "data" table was not found.
Any suggestions?
ADDITIONAL INFORMATION
This is a generated SQL query.
UPDATE `post` SET `data_value` = '111', `data_date` = '2012-02-13', `post_text` = '111' WHERE `post_stream_id` = '5' AND `post_id` = '18'
This is mistake
Unknown column 'data_value' in 'field list'
It does not show the JOIN instruction.
source share