开发者

KOHANA 3 ORM: How to use sha1 in ->where

I'd like to make select this way select from post where sha1(id)=$id;

So I thought this could be in KO3 ORM somethink like: post = ORM::factory('post')->where('sha1(id)','=',$id)->find();

question is how to use 'sha1(id)' in where function because this way doen't work in KO3-OR开发者_JAVA百科M

thnkx


You're just slightly off. It should be:

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜