php my admin mysql query

instant99
instant99 used Ask the Experts™
on
How do i write a query that combines all these into one result
SELECT `website` FROM `data` WHERE `company` LIKE '1' LIMIT 5;
SELECT `website` FROM `data` WHERE `company` LIKE '2' LIMIT 5;
SELECT `website` FROM `data` WHERE `company` LIKE '3 LIMIT 5;

I want to get back 5 records for each company name 1,2 and 3
the resulting recordset should be 15

im sure the easy answer is to write this in php but i prefer to do a mysql query that brings me back the 15 rows
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
If your company names are 1,2 and 3. no need to use LIKE. you can use =

(SELECT `website` FROM `data` WHERE `company`= '1' LIMIT 5)
UNION ALL
(SELECT `website` FROM `data` WHERE `company` = '2' LIMIT 5)
UNION ALL
(SELECT `website` FROM `data` WHERE `company` = '3 LIMIT 5)
SELECT `website` FROM `data` WHERE `company` LIKE '1' OR `company` LIKE '2' OR `company` LIKE '3' LIMIT 5;

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial