error connect mysqli

Questionserror connect mysqli
agustin asked 10 years ago

Hello good, I bought your code for the site and have the following error, please would need to fix it ..


( ! ) Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in C:wampwwwxxxxcompradodemoseditingindex.php on line 14

My config.php

// PHP Grid database connection settings
define("PHPGRID_DBTYPE","Mysqli"); // or mysqli

// Automatically make db connection inside lib

// Basepath for lib


2 Answers
Abu Ghufran answered 10 years ago

Please change Mysqli to mysqli (small m)

Abu Ghufran answered 10 years ago

also set

If you need custom connection without config file, Here is the config settings.

$db_conf = array();
$db_conf["type"] = "mysqli";
$db_conf["server"] = "localhost"; // or you mysql ip
$db_conf["user"] = "root"; // username
$db_conf["password"] = "test"; // password
$db_conf["database"] = "griddemo"; // database

// include and create object
$base_path = strstr(realpath("."),"demos",true)."lib/";

$g = new jqgrid($db_conf);

Your Answer

13 + 0 =

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?