开发者

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

开发者 https://www.devze.com 2023-01-30 22:29 出处:网络
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:

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

精彩评论

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