コード例 #1
0
ファイル: BindingTest.php プロジェクト: lox/pheasant
 public function testBindWithBackquote()
 {
     $binder = new Binder();
     $this->assertEquals($binder->magicBind('`id`=?', array(1)), "`id`='1'");
 }
コード例 #2
0
ファイル: Criteria.php プロジェクト: lox/pheasant
 /**
  * Binds an array of parameters into a string
  * @return string
  */
 public function bind($sql, $params = array())
 {
     $binder = new Binder();
     return $binder->magicBind($sql, (array) $params);
 }
コード例 #3
0
ファイル: Query.php プロジェクト: lox/pheasant
 /**
  * Convenience method for orderBy, to be consistent with where and andWhere.
  * @chainable
  */
 public function andOrderBy($sql, $params = array())
 {
     $binder = new Binder();
     $this->_order[] = $binder->magicBind($sql, (array) $params);
     return $this;
 }