Welcome Guest, Not a member yet? Register   Sign In
Handle mysql errors using query builder
#4

(12-15-2017, 06:20 PM)geabenitez Wrote: Thank you for the answer, but this is for simple queries. I am asking for query builder.

What Query Builder does is write query strings with the various parts provided by separate functions. Eventually, the database method -  _compile_select() - gathers all the input you provide with select(), from(), where(), etc and creates a string.

Inside db->get() it literally calls
PHP Code:
$this->query($this->_compile_select()); 

Inside the query() method a call to simple_query('your compiled select string here');

The moral of all this is that ultimately all Query Builder queries are "simple" queries,

Please feel free to use $this->db->error(); along with Query Builder.
Reply


Messages In This Thread
RE: Handle mysql errors using query builder - by dave friend - 12-15-2017, 09:55 PM



Theme © iAndrew 2016 - Forum software by © MyBB