コード例 #1
0
ファイル: Between.php プロジェクト: reoring/sabel
 public function build(Sabel_Db_Statement $stmt)
 {
     $f = ++self::$counter;
     $t = ++self::$counter;
     $val = $this->value;
     $stmt->bind("ph{$f}", $val[0]);
     $stmt->bind("ph{$t}", $val[1]);
     $column = $this->getQuotedColumn($stmt);
     if ($this->isNot) {
         $column = "NOT " . $column;
     }
     return $column . " BETWEEN @ph{$f}@ AND @ph{$t}@";
 }
コード例 #2
0
ファイル: Equal.php プロジェクト: reoring/sabel
 public function build(Sabel_Db_Statement $stmt)
 {
     $num = ++self::$counter;
     $stmt->bind("ph{$num}", $this->value);
     $column = $this->getQuotedColumn($stmt);
     if ($this->isNot) {
         $column = "NOT " . $column;
     }
     return $column . " = @ph{$num}@";
 }