Hi guys..I have this sqlselect Item,itemid,averate,tally, COUNT(*) AS hits FROM (SELECT Item, itemid,averate,tally FROM Items WHERE Item LIKE '%nokia%' UNION ALL SELECT Item, itemid,averate,tally FROM Items WHERE Item LIKE '%tablet%') AS d GROUP BY Item, itemid,averate,tally order by hits desc
It works great..the importanbt part, is it removes the duplicates for me, and counts howmany their were, putting the results in order for me, based on how many of the search terms it found. and with more search terms, I just add another UNION ALL..I only ever show 100 results at a time, on a web page, but want to show the total results..I have tried with no sucess...I can either return another col, with the total count, or run a second query that will give me the count.. neither of which I can figure out...any help would be apreciated..