Welcome Guest, Not a member yet? Register   Sign In
Variable in Query?
#6

[eluser]ejangi[/eluser]
You can also use query-bindings, which takes care of escaping as well - though in this instance (because we're casting) it's probably overkill:
Code:
$query = $this->db->query('SELECT * FROM pages WHERE pageID = ?', array((int) $id));


Messages In This Thread
Variable in Query? - by El Forum - 12-15-2007, 12:29 PM
Variable in Query? - by El Forum - 12-15-2007, 02:24 PM
Variable in Query? - by El Forum - 12-15-2007, 02:24 PM
Variable in Query? - by El Forum - 12-15-2007, 02:30 PM
Variable in Query? - by El Forum - 12-15-2007, 04:08 PM
Variable in Query? - by El Forum - 12-15-2007, 04:32 PM



Theme © iAndrew 2016 - Forum software by © MyBB