Several databases

QuestionsSeveral databases
Gustavo Lazaro asked 2 years ago

Dear Abu, you can have two grids from two different databases in the same php program.

1 Answers
Abu Ghufran Staff answered 2 years ago

Yes, That’s doable.

You just need to change the database configuration array passed to the constructor of jqgrid(…);

e.g.

$g1 = new jqgrid($db1);
$g2 = new jqgrid($db2);

Where $db1 and $db2 is the configuration array like:

$db1 = array();
$db1["type"] = "mysqli";
$db1["server"] = "127.0.0.1";
$db1["user"] = "user"; // username
$db1["password"] = "pass"; // password
$db1["database"] = "griddemo1"; // database

 

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

5 + 7 =

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?