根据api
(http://trac.propelorm.org/wiki/Documentation/1.6/ModelCriteria),我正在寻找类似的东西:
$param1 = 5;
$param2 = 3;
select id, name from testtable where ((sin(?) * (cos(?));
等于
select id, name from testtable where ((sin($param1) * (cos($param2));
我怎么能用推进器做到这一点?我只找到了一次只绑定一个变量的方法。
(我不想做一个“AND”我只想绑定多个变量)
从文档中,这是用于绑定一个变量:
<?php
// Finding all Books where title = 'War And Peace'
$books = BookQuery::create()
->where('Book.Title = ?', 'War And Peace')
->find();
?>