function Search($indexedbyid = false, $loose = false) { $o = new stdClass(); // Store any values that have been added before we make them safe foreach ($this as $prop => $val) { if (isset($val)) { $o->{$prop} = $val; } } // Make everything safe for us to search with $this->MakeSafe(); // This will store all our extended sql $sqlextend = ""; foreach ($o as $prop => $val) { extendsql($prop, $this->{$prop}, $sqlextend, $loose); } // The join is purely to sort the templates by the manufacturer's name $sql = "SELECT * FROM fac_CabRow {$sqlextend} ORDER BY Name ASC;"; $rowList = array(); foreach ($this->query($sql) as $row) { if ($indexedbyid) { $rowList[$row["CabRowID"]] = CabRow::RowToObject($row); } else { $rowList[] = CabRow::RowToObject($row); } } return $rowList; }
function GetCabRowList() { $sql = "SELECT * FROM fac_CabRow ORDER BY Name ASC;"; $cabrowList = array(); foreach ($this->query($sql) as $row) { $cabrowList[] = CabRow::RowToObject($row); } return $cabrowList; }