2011-01-19 40 views
2

自明的标题:您如何在Kohana 3中进行orwhere语句?在Kohana ORWHERE的等效3 ORM模型

如:

$artist_check = ORM::factory('artist') 
->where('name', '=', strtolower($itunes->artistName)) 
->orwhere('itunesId', '=', strtolower($itunes->artistId)) 
->find(); 

此语句抛出一个异常“无效的方法orwhere” ......随着K3文档是非常糟糕我想我会问你们。

回答

4

的Kohana如下underscore_notation,因此该方法名称是or_where,而不是orWhere

另外API documentation可能会有所帮助。

+1

+1你击败了我的链接。 – 2011-01-19 16:51:44