Difference between fetch and fetchAll in PDO
Solved
playboy-1990
Posted messages
593
Status
Membre
-
zzz -
zzz -
Hello,
I would like to know the difference between fetch and fetchAll.
Thank you.
I would like to know the difference between fetch and fetchAll.
Thank you.
1 réponse
Hello,
If I remember correctly: fetch will only return the first response to your query in an array, while fetchAll will return all the responses.
In other words: fetch will create an array with just one row, while fetchAll will create an array containing as many rows as there are responses.
--
Until we try, we won't know.
If I remember correctly: fetch will only return the first response to your query in an array, while fetchAll will return all the responses.
In other words: fetch will create an array with just one row, while fetchAll will create an array containing as many rows as there are responses.
--
Until we try, we won't know.
Thank you