DB Query error logs not showing the script name |
For example I got the following error in log file.
Quote:ERROR - 2016-07-27 10:19:43 --> Query error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 - Invalid query: select status as value from users where regid = The above query is called from many controllers, so I wish to know the script name / controller / URI which produces the above error. Is there any work around to improve the CI error logging? PHP Code: if ( ! $this->db->simple_query('SELECT `example_field` FROM `example_table`')) Get the last error. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(07-27-2016, 07:05 AM)karthik_code Wrote: For example I got the following error in log file. This is what happens when you don't do abstractions. Properly structured code would enable you to easily find the error.
|
Welcome Guest, Not a member yet? Register Sign In |