Question

I know I can bind params in Kohana like this

$this->db->query('SELECT * FROM products WHERE id = ?', array(14));

But is there a way to do it with identifiers (or whatever they are called?)

As in

$this->db->query('SELECT * FROM products WHERE id = :id', array(':id' => 14));

Thanks

Was it helpful?

Solution

Version 2.x has no support for it, but 3.x supports it. See this forum post.

OTHER TIPS

that functionality is available in the new 2.4/3.0 versions of Kohana, the current 2.3 release does not support it.

I'm pretty positive Kohana does not do this. When looking at the Database class, all bound parameters are handled in a method called compile_binds... Looks like it only supports the ? syntax.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top