0byt3m1n1
Path:
/
data
/
applications
/
aps.bak
/
magento
/
1.1.3-2
/
standard
/
htdocs
/
lib
/
Varien
/
Db
/
[
Home
]
File: Select.php
<?php class Varien_Db_Select extends Zend_Db_Select { /** * Class constructor * * @param Zend_Db_Adapter_Abstract $adapter */ public function __construct(Zend_Db_Adapter_Abstract $adapter) { parent::__construct($adapter); } /** * Adds a WHERE condition to the query by AND. * * If a value is passed as the second param, it will be quoted * and replaced into the condition wherever a question-mark * appears. Array values are quoted and comma-separated. * * <code> * // simplest but non-secure * $select->where("id = $id"); * * // secure (ID is quoted but matched anyway) * $select->where('id = ?', $id); * * // alternatively, with named binding * $select->where('id = :id'); * </code> * * Note that it is more correct to use named bindings in your * queries for values other than strings. When you use named * bindings, don't forget to pass the values when actually * making a query: * * <code> * $db->fetchAll($select, array('id' => 5)); * </code> * * @param string $cond The WHERE condition. * @param string $value OPTIONAL A single value to quote into the condition. * @param constant $type OPTIONAL The type of the given value * @return Zend_Db_Select This Zend_Db_Select object. */ public function where($cond, $value = null, $type = null) { if (is_null($value) && is_null($type)) { $value = ''; } if (is_array($value)) { $cond = $this->_adapter->quoteInto($cond, $value); $value = null; } return parent::where($cond, $value, $type); } }