mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Added a new option to the db connection function
This commit is contained in:
parent
6d47307ad2
commit
ade22203c5
@ -14,7 +14,7 @@
|
|||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
function oracle_connect_db($host = null, $db = null, $user = null, $pass = null, $port = null) {
|
function oracle_connect_db($host = null, $db = null, $user = null, $pass = null, $port = null, $new_connection = true) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
if ($host === null)
|
if ($host === null)
|
||||||
@ -30,7 +30,11 @@ function oracle_connect_db($host = null, $db = null, $user = null, $pass = null,
|
|||||||
|
|
||||||
// Non-persistent connection: This will help to avoid mysql errors like "has gone away" or locking problems
|
// Non-persistent connection: This will help to avoid mysql errors like "has gone away" or locking problems
|
||||||
// If you want persistent connections change it to oci_pconnect().
|
// If you want persistent connections change it to oci_pconnect().
|
||||||
$connect_id = oci_new_connect($user, $pass, '//' . $host . ':' . $port . '/' . $db);
|
if ($new_connection)
|
||||||
|
$connect_id = oci_new_connect($user, $pass, '//' . $host . ':' . $port . '/' . $db);
|
||||||
|
else
|
||||||
|
$connect_id = oci_connect($user, $pass, '//' . $host . ':' . $port . '/' . $db);
|
||||||
|
|
||||||
if (! $connect_id) {
|
if (! $connect_id) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user