SQL language is easy and allows for many type of options when searching
select * from table where field IN ($somearray)
select * from table where field1 = '$somevalue' and field2='$anothervalue'
select * from table where field='$somevalue' or field='$anothervalue'
select * from table where field like '%$somevalue%'
other attributes include ORDER BY field(sorting)
GROUP BY field (groups like records
so it depends on what you are trying to do. i would suggest a book on mysql/sql language to help get the basics down and build from there
also see www.mysql.com