I am using the PHP Codeigniter framework for my project work. Here I have written a MySQL query to save data. After click on the save button it redirects to the next page but the data not saved and no error returns.
My Code
<?php $saveData = $this->db->insert('myTable', $arrayData); if($saveData) { return redirect('list-page'); }else { return redirect('form-page'); } ?>
Page all-time redirect list-page but data not saved, I am confused what is wrong here. I want to show the last executed query so that I got what is the exact issue here. How can I get the last executed query in Codeigniter?
Question and answer is powered by AnsPress.io