I am working with a rather large database of information now and some queries return quite a hefty amount of information. From what I have read, foreach() is quicker than using while() loops with larger arrays, but that can’t be used with mysql functions.
So as a general question, which of the 3 is faster for large databases which feth 1000s of rows with quite a lot of data? mysql, mysqli or PDO?
Thanks!
mysql shouldn’t be used since it’s outdated and has been superseded by mysqli. As for the differences between mysqli and PDO, consider these:
Reasons to use mysqli
Reasons to use PDO