Fetching Multiple Rows with MySQL

Does the MySQL command let you fetch more than one row? What if 5, 10 or 50 rows match the SELECT query? How do you get access to them all?


This isn’t exactly the best place to be asking a SQL question, but the default behavior is to return all matching rows:

SELECT * FROM Customers WHERE last_name=‘Smith’

Would return “John Smith”, “Robert Smith”, etc.

You misunderstood my question. I wasn’t asking how to use SQL. I was asking how to make Asterisk return multiple rows for a given SQL query.

A single row is fetched.

Don’t take this the wrong way, but why do people keep jumping in and answering questions flippantly?