public static function delete($ids) { if (!is_array($ids)) { $ids = array($ids); } if (empty($ids)) { return; } $db = DevblocksPlatform::getDatabaseService(); $id_string = implode(',', $ids); $sql = sprintf("DELETE QUICK FROM custom_field WHERE id IN (%s)", $id_string); $db->Execute($sql) or die(__CLASS__ . '(' . __LINE__ . ')' . ':' . $db->ErrorMsg()); if (is_array($ids)) { foreach ($ids as $id) { DAO_CustomFieldValue::deleteByFieldId($id); } } self::clearCache(); }