Answer the question
In order to leave comments, you need to log in
CodeIgniter create exact query?
I create a request with parameters
this->db->get_where( 'contacts', array( 'customer_id' => $id ) )->result_array();
this->db->get_where( 'contacts', array( 'customer_id' => $id ) )->row_array();
Answer the question
In order to leave comments, you need to log in
And in the Database itself, does customer_id have an INT type or something else?
In my opinion, your request looks completely different from what you think.
echo $this->db->last_query();
The codeignitor query builder has an unpleasant feature.
$this->db->something
and if you type it somewhere in a function in parts, and then decide that you
don’t need to call get or get_where, then the garbage will be attached to the next request.
There is even a method.
$this->db->reset_query()
Resetting Query Builder allows you to start fresh with your query without executing it first using a method like $this->db->get() or $this->db->insert() . Just like the methods that execute a query, this will not reset items you've cached using Query Builder Caching
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question