dsx58940 2009-10-09 00:54
浏览 59
已采纳

绑定参数与Kohana的数据库库

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

  • 写回答

3条回答 默认 最新

  • duan7007 2009-10-12 17:22
    关注

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

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?