Start your All-Access Pass to unlock this challenge
What's the significance of using the fetch() method instead of fetchAll() with the following query (which will always match exactly 1 or 0 rows):
fetch()
fetchAll()
SELECT * FROM product WHERE id = 1
fetch() fetches a single row, while fetchAll() fetches the single row wrapped in an array.
fetch() fetches a single row, while fetchAll() fetches all rows.
There is no difference between fetch() and fetchAll() when querying for a single row.
fetch() fetches rows in a random order, while fetchAll() fetches them sequentially.