| [ Index ] |
PHP Cross Reference of Limb3 |
[Summary view] [Print] [Text view]
1 <?php 2 /* 3 * Limb PHP Framework 4 * 5 * @link http://limb-project.com 6 * @copyright Copyright © 2004-2007 BIT(http://bit-creative.com) 7 * @license LGPL http://www.gnu.org/copyleft/lesser.html 8 */ 9 lmb_require('limb/dbal/src/criteria/lmbSQLBaseCriteria.class.php'); 10 11 /** 12 * class lmbSQLFieldBetweenCriteria. 13 * 14 * @package dbal 15 * @version $Id: lmbSQLFieldBetweenCriteria.class.php 5945 2007-06-06 08:31:43Z pachanga $ 16 */ 17 class lmbSQLFieldBetweenCriteria extends lmbSQLBaseCriteria 18 { 19 protected $value_from; 20 protected $value_to; 21 protected $column; 22 23 function __construct($column, $value_from, $value_to) 24 { 25 $this->column = $column; 26 $this->value_from = $value_from; 27 $this->value_to = $value_to; 28 } 29 30 protected function _appendExpressionToStatement(&$str, &$values, $conn) 31 { 32 $str .= $conn->quoteIdentifier($this->column) . ' BETWEEN '; 33 34 $from_placeholder = $this->_makePlaceHolder('f' .$this->column . sizeof($values)); 35 $to_placeholder = $this->_makePlaceHolder('t' .$this->column . sizeof($values)); 36 37 $str .= ':' . $from_placeholder . ': AND :' . $to_placeholder . ':'; 38 $values[$from_placeholder] = $this->value_from; 39 $values[$to_placeholder] = $this->value_to; 40 } 41 } 42 43 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Tue Oct 7 05:02:03 2008 | Cross-referenced by PHPXref 0.7 |