【问题标题】:KOHANA 3 ORM: How to use sha1 in ->whereKOHANA 3 ORM:如何在 ->where 中使用 sha1
【发布时间】:2010-12-15 11:55:14
【问题描述】:

我想以这种方式进行选择 从帖子中选择 sha1(id)=$id;

所以我认为这可能在 KO3 ORM 中,例如: post = ORM::factory('post')->where('sha1(id)','=',$id)->find();

问题是如何在 where 函数中使用 'sha1(id)' 因为这种方式在 KO3-ORM 中不起作用

谢谢

【问题讨论】:

    标签: sha1 kohana-orm


    【解决方案1】:

    你只是有点不对劲。应该是:

    ORM::factory('post')->where('sha1("id")','=',$id)->find();
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多