Exemple #1
0
 public function testBindWithBackquote()
 {
     $binder = new Binder();
     $this->assertEquals($binder->magicBind('`id`=?', array(1)), "`id`='1'");
 }
Exemple #2
0
 /**
  * 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);
 }
Exemple #3
0
 /**
  * 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;
 }