I am trying to use PDO
I use Windows 10, php 7.4.2 and XAMPP
$base = new PDO("mysqli:host=localhost; dbname=test, 'root','' ");
And I get the following Fatal error: Uncaught PDOException: could not find driver in C:\xampp\htdocs\Curso\pdo.php:2 Stack trace: #0 C:\xampp\htdocs\Curso\pdo.php(2) : PDO->__construct('mysqli:host=loc...') #1 {main} thrown in C:\xampp\htdocs\Course\pdo.php on line 2
I have gone to the php.ini file and I have entered the following line extension=php_pdo_mysql.dll since it did not have it, and it still does not go, I have the DLL in the EXT folder
It's because it doesn't have the 'i' in mysql
I recommend this page , it helped me a lot to make the connection to the database and make queries