In my Laravel when I am executing a simple select query to see if everything is working I am getting the error in my PHP 7.0.1 Laravel page.
QueryException
could not find driver
So in order to check everything I wrote simple PHP page without Laravel and I am able to connect to the same DB using the PHP function and this is returning the results means with respect to DB and PHP everything is fine.
<?php
$servername = "ABBDBDBBD\SQLEXPRESS";
$connectionInfo = array("Database"=>"DB_NAME", "UID"=>"sa", "PWD"=>"PASSWORD");
if($connect)
{
$search_query = " SELECT TOP 15 * FROM TBL_CLIENT ";
$result_query = sqlsrv_query($connect,$search_query);
while($row = sqlsrv_fetch_array($result_query))
{
echo $row['CLIENT_MNEMONIC'];
}
}
else
{
echo "Not Connected";
}
?>
This is working fine so my guess is that PHP is working fine with the WAMP but something is not write with my Laravel or I am missing some small thing. I changed my Composer PHP version from PHP 5.6 to 7.0.1 during the time I am getting this error. Everything in Laravel was working fine when I was using PHP 5.6 but not sure what went wrong.
This is the complete error message in my PHP page.
(3/3) QueryException
could not find driver (SQL: SELECT TOP 5 * FROM TBL_CLIENT
WHERE CLIENT_MNEMONIC LIKE 'ac%'
AND ACTIVE_IND = 1
ORDER BY CLIENT_MNEMONIC
)
in Connection.php line 647
at Connection->runQueryCallback(' SELECT TOP 5 * FROM TBL_CLIENT WHERE CLIENT_MNEMONIC LIKE \'ac%\' AND ACTIVE_IND = 1 ORDER BY CLIENT_MNEMONIC ', array(), object(Closure))
in Connection.php line 607
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire