troubleshooting Question

php my admin mysql query

Avatar of instant99
instant99 asked on
MySQL Server
2 Comments1 Solution328 ViewsLast Modified:
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
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros