/** append a SQL string to the query field. Return the added SQL.
* As of version 2.1 this method assumes paramerized queries.
* @param string columnName The name of the column. If the name needs to be prefixed, it must already be prefixed.
* @param mixed $value
* @param mixed $placeholder to use (parameterized queries)
*/
function ($columnName, $value, $placeholder='?') {
$sql = " WHERE ($columnName ";
$sql .= $value === null ? "IS " : "= ";
$sql .= $this->($value, $placeholder); // $this->($value);
$sql .= ')';
$this->query .= $sql;
return $sql;
}
|