ADONewConnection: Unable to load database driver

QuestionsADONewConnection: Unable to load database driver
Biju asked 2 months ago

I am using free version of Grid4PHP, while I connect to MySQL db, getting below error

ADONewConnection: Unable to load database driver ”

Below are the configuration in the file
// include db config
include_once(“./config.php”);

// include and create object
include(PHPGRID_LIBPATH.”inc/jqgrid_dist.php”);

// Database config file to be passed in phpgrid constructor
$db_conf = array(
“mysqli” => PHPGRID_DBTYPE,
“localhost” => PHPGRID_DBHOST,
“root” => PHPGRID_DBUSER,
“123” => PHPGRID_DBPASS,
“test” => PHPGRID_DBNAME
);

$g = new jqgrid($db_conf);

Please help be

Regards

\

Biju

1 Answers
Abu Ghufran Staff answered 1 month ago

What you wrote is incorrect PHP syntax.

It should be like:

// Database config file to be passed in phpgrid constructor
$db_conf = array(
                    “type”      => “mysqli”,
                    “server”    => “localhost”,
                    “user”      => “root”,
                    “password”  => “123”,
                    “database”  => “test”
                );
$g = new jqgrid($db_conf);

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

19 + 1 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?