Create a script which asks a user for a string to search for in a stock item's description (eg "dynamite").
Allow the user to choose either "Full name", "Beginning of name" or "Part of name" as a search type.
Create different SQL queries using LIKE to search the data depending on their choices
Change the script so that people can use DOS/Unix style wildcards (* and ?) then use their wildcard expression in your SQL query - convert the wildcards to SQL-style wildcards by using regular expressions