mysqli connection

Questionsmysqli connection
francisco jose noya asked 5 years ago

Hello Abu,
I have a grid that works well with msql connection.
Now I have to insert it into a project that uses a mysqli connection file.
It is mandatory that I use the existing connection file in this grid script.
When I include it, this error appears on the screen:
This page does not work
The page pedralbesbooking.es can not process this request now.
HTTP ERROR 500
This is the connection file
This is the grid script
Thanks for your help.
Francisco

1 Answers
Abu Ghufran Staff answered 5 years ago

To switch from mysql to mysqli, you only need to change

$db_conf[“type”] = “mysql”;
to
$db_conf[“type”] = “mysqli”;
This configuration could be in config.php OR your grid code.
e.g.
$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
$g = new jqgrid($db_conf);

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

17 + 19 =

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?