Welcome Guest, Not a member yet? Register   Sign In
database query combine possibility
#2

(This post was last modified: 07-16-2017, 03:26 PM by PaulD.)

Hi,

Since you have already written the sql why not just use it like so:

PHP Code:
$this->db->query('YOUR QUERY HERE'); 

For complex queries it is often easier to write an sql query and use is as above.

In the docs: https://www.codeigniter.com/user_guide/d...ml#queries

Best wishes,

Paul.

PS You can also enable the profiler to view the query that was generated which often shows you where it is going wrong.
PHP Code:
$this->output->enable_profiler(TRUE); 
Reply


Messages In This Thread
RE: database query combine possibility - by PaulD - 07-16-2017, 03:20 PM



Theme © iAndrew 2016 - Forum software by © MyBB