![]() Json_model interact with database and stored json string into database. It shows the form page where user can enter and submit employee data.Ĭonvert CodeIgniter Query to Json & Insert Into DatabaseĮcho form_dropdown('select', $data_gender, 'Male', 'class="dropdown_box"') $data = 'Please configure your database correctly' $data = 'Json data successfully inserted into database !' $return = $this->json_model->insert_json_in_db($json_data) 'employee_address' => $this->input->post('address'), 'employee_gender' => $this->input->post('select'), 'employee_email' => $this->input->post('emp_email'), 'employee_name' => $this->input->post('emp_name'), Object or array cannot be found in the specified JSON path.Īs expected, strict mode results in an error message explaining the error.// Fetch user data and convert data into json Result: Msg 13624, Level 16, State 2, Line 1 SELECT JSON_QUERY('', 'strict $.Name') AS 'Result' Here’s what happens when the path expression contains an error while in lax mode. Here’s an example to demonstrate the difference between these two modes. In strict mode, the function raises an error if the path expression contains an error. For example, if you request the value $.name, and the JSON text doesn’t contain a name key, the function returns null, but does not raise an error.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |