View Single Post
  #4  
Old 08-08-2007, 11:48 AM
John Adams
Demi-God
 
Join Date: Jul 2006
Posts: 1,552
Default

To find items containing any of your letters:
select * from items where name like '%partial name%';

To find items starting with any of your letters:
select * from items where name like 'partial name%';

To find items ending any of your letters:
select * from items where name like '%partial name';

etc... "like" is the option you're looking for. the percents '%' are like wildcards.


Example:
select * from items where name like '%ration%';

...would return anything in the Item Database with the word "ration" anywhere in the name.


If you do not want to see the whole Item record, change "select *" to "select id, name"... etc. A valid column name from the Items table.
Reply With Quote