multiple oracle connection

Questionsmultiple oracle connection
Chris Doume asked 4 years ago

Hi Abu

How can I have multiple oracle connections in the same file, through config.php?

Thank you

2 Answers
Abu Ghufran Staff answered 4 years ago

You can create 2 datagrid object with different connections. The main connection code is used above each grid code sample.

e.g.

$db_conf = array(
“type” => PHPGRID_DBTYPE,
“server” => PHPGRID_DBHOST,
“user” => PHPGRID_DBUSER,
“password” => PHPGRID_DBPASS,
“database” => PHPGRID_DBNAME
);

$grid1 = new jqgrid($db_conf);

Replace all constants with the values you set in config.php, Just like $grid1, replicate same code with $grid2 with different values.

You can later call database queries using:

$grid1->get_one(“<sql>”);
$grid1->get_all(“<sql>”);
OR
$grid2->execute_query(“<SQL>”);

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Chris Doume answered 4 years ago

Thank you

Your Answer

5 + 5 =

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 5 / 5. Vote count: 1

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?