I know it's a little stupid question, but I want to know what is PDO exactly,a teacher of me said once that the PDO have classes too, I couldn't find them, is he wrong or I'm bad at googling ?
Asked
Active
Viewed 30 times
-1
-
1If you look in the manual page - http://php.net/manual/en/book.pdo.php, there are different classes which make up the PDO extension. – Nigel Ren Apr 28 '18 at 11:39
-
PDO is an interface that uses classes to access different database systems. – Karlo Kokkak Apr 28 '18 at 12:14
-
maybe help you : https://www.w3schools.com/php/php_mysql_prepared_statements.asp – Abdo Bmz Apr 28 '18 at 17:49
-
Duplicate question: https://stackoverflow.com/questions/6980792/what-is-pdo-why-should-i-use-it – anothermh Apr 28 '18 at 23:43
1 Answers
0
Most Classes are Extensions of other classes in their final form. Your teacher was sort of technically correct, but it's a terrible way to explain what he was (hopefully) getting at.
That doesn't at all mean they're a "collection of classes" or at the very least explaining it that way is a great way to confuse the hell out of your students when they're learning how class extension works.

Mason Stedman
- 613
- 5
- 12
-
When you're writing constructors like the "PDO class" you usually write then as a chain of extensions that starts with a simple data model, and then progressively adds the "parts" through extension. You do this because ... to much to cover ... but it's more the smart way to write one class correctly for later maintenance than the implied "this is 50 classes put together" – Mason Stedman Apr 28 '18 at 11:27