valid_image_types = array(1,2); $this->max_images = 10; parent::__Construct(); } function get_items_by_style($style_number, $use_like=FALSE) { // returns array of matching style #s // for use_like automatically puts % at end -> when calling fn can manually put it at beginning too $matches = array(); $op = ($use_like) ? "LIKE" : "="; $search = ($use_like) ? "$style_number%" : "$style_number"; $sel = "SELECT id FROM $this->dbTableName WHERE style_number $op '$search'"; //echo $sel; $RS = Database::ado_execute_query($sel, "ItemsAdmin::get_item_by_style"); while($row = $RS->FetchRow()) { $matches[] = $row['id']; } return($matches); } } ?>