Jump to content

how to install PHP_MYSQL driver?


Recommended Posts

I tried the following script:

 

<?php

 

try {

$user='root';

$pass='mysqlmysqli';

$dbh = new PDO ('mysql:hos=localhost;dbname=test',$user,$pass);

 

foreach ($dbh->query('SELECT * FROM albums')as $row) {

print_r($row);

}

 

$dbh=null;

}

catch(PDOException $e) {

print "Error: ". $e->getMessage()."<br />";

die();

}

?>

 

but it shows "error: could not find driver".

I think it is the PHP_MYSQL driver. How can I install it? I looked for it on the net but couldn't find anything. I am just a beginner in PHP. Please help.

Link to comment
https://forums.phpfreaks.com/topic/253817-how-to-install-php_mysql-driver/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.