I get an error when using get_dropdown_values together with mysqli.
$db_conf["type"] = "mysqli";
$db_conf["server"] = "localhost"; // or you mysql ip
$db_conf["user"] = "user"; // username
$db_conf["password"] = "password"; // password
$db_conf["database"] = "dbname"; // database
$str = $g->get_dropdown_values("select team_id as k, team_name as v from t_teams");
Error:
"Couldn't execute query. Access denied for user 'apache'@'localhost' (using password: NO) – select team_id as k, team_name as v from t_teams"
Any ideas?
Hello,
This comes when you provide incorrect credentials (user/pass) of mysql database.
Plus one more update, If you are dealing with utf8 characters, you need to replace a line in jqgrid_dist.php.
Updated for next version.
This:
if ($db_conf["type"] == "mysql")
$this->con->Execute("SET NAMES 'utf8'");
With:
if ($db_conf["type"] == "mysql" || $db_conf["type"] == "mysqli")
$this->con->Execute("SET NAMES 'utf8'");