Welcome Guest, Not a member yet? Register   Sign In
Is it possible with Active Record?
#3

(This post was last modified: 03-19-2016, 03:31 PM by ardhie1032.)

(03-19-2016, 11:39 AM)fulopm Wrote:
PHP Code:
 $sql "SELECT id, fullname, phone FROM users WHERE country=(SELECT country_id FROM country WHERE name=?) AND  type=?"

Simple with query bindings (without AR or QB):
PHP Code:
$sql "SELECT id, fullname, phone FROM users WHERE country=(SELECT country_id FROM country WHERE name=?) AND  type=?";
$this->db->query($sql, array($name$type)); 

Query Bindings
Reply


Messages In This Thread
Is it possible with Active Record? - by fulopm - 03-19-2016, 11:39 AM
RE: Is it possible with Active Record? - by ardhie1032 - 03-19-2016, 03:29 PM



Theme © iAndrew 2016 - Forum software by © MyBB