- Allow the tableeditor subclass to return an empty array for the WHERE clause,

and handle that case.
This commit is contained in:
dave 2007-01-30 20:00:17 +00:00
parent 57dfb7df27
commit e71d3c0bbb

View File

@ -945,7 +945,6 @@ class TableEditor
if(is_callable(array($this->classname, 'tableEditorGetList'))) {
list($sel, $from, $where) = call_user_func(array($this->classname, 'tableEditorGetList'), &$this);
} else {
echo "Calling default func\n";
list($sel, $from, $where) = $this->defaultGetList();
}
@ -953,7 +952,9 @@ class TableEditor
$query .= " FROM ";
foreach($from as $f) $query .= "$f ";
$query .= " WHERE 1 ";
foreach($where as $w) $query .= "AND $w ";
if(is_array($where)) {
foreach($where as $w) $query .= "AND $w ";
}
if($this->sortField())
$query.=" ORDER BY ".$this->sortField()."";