10 defined(
'JPATH_PLATFORM') or die;
37 protected $bounded = array();
55 public function bind($key = null, &$value = null, $dataType = PDO::PARAM_STR, $length = 0, $driverOptions = array())
60 $this->bounded = array();
68 if (isset($this->bounded[$key]))
70 unset($this->bounded[$key]);
78 $obj->value = &$value;
79 $obj->dataType = $dataType;
80 $obj->length = $length;
81 $obj->driverOptions = $driverOptions;
84 $this->bounded[$key] = $obj;
99 public function &getBounded($key = null)
103 return $this->bounded;
107 if (isset($this->bounded[$key]))
109 return $this->bounded[$key];
123 public function clear($clause = null)
128 $this->bounded = array();
132 parent::clear($clause);
152 public function processLimit($query, $limit, $offset = 0)
154 if ($limit > 0 || $offset > 0)
156 $query .=
' LIMIT ' . $offset .
', ' . $limit;
176 public function setLimit($limit = 0, $offset = 0)
178 $this->limit = (int) $limit;
179 $this->offset = (int) $offset;
199 public function dateAdd($date, $interval, $datePart)
202 if (strcasecmp($datePart,
'microseconds') == 0)
204 $interval = .001 * $interval;
205 $datePart =
'seconds';
208 if (substr($interval, 0, 1) !=
'-')
210 return "datetime('" . $date .
"', '+" . $interval .
" " . $datePart .
"')";
214 return "datetime('" . $date .
"', '" . $interval .
" " . $datePart .
"')";