MariaDB / mysql: JOIN (SELECT ... FROM ... WHERE) USING (...) |
Hi,
is there a function in Codeigniter to use "JOIN .. USING .." like $this->db->join_using()? I use Codeigniter 3.0.4 with mariaDB and need the following statement: Code: JOIN (SELECT ... FROM ... WHERE) USING (...) instead of the "normal" JOIN .. ON ... , which results from Code: $this->db->join('mytable as my','t1.id = t2.id') I follow the post of newtover Feb 12 '13 at 15:54 ("What I would suggest") from https://stackoverflow.com/questions/1477...e-group-by Code: SELECT *
Why do you need USING clause, you can use ON clause intead:
PHP Code: $this->db->select('max(post_date) as post_date, post_author') As I know there is no USING clause in CI Query builder. But if you want it you can extend Query_builder and implement your own join method |
Welcome Guest, Not a member yet? Register Sign In |