| @@ 72-78 (lines=7) @@ | ||
| 69 | $connection = @mysqli_connect((!empty($db_options['persist']) ? 'p:' : '') . $db_server, $db_user, $db_passwd, '', $db_port); |
|
| 70 | ||
| 71 | // Something's wrong, show an error if its fatal (which we assume it is) |
|
| 72 | if (!$connection) |
|
| 73 | { |
|
| 74 | if (!empty($db_options['non_fatal'])) |
|
| 75 | return null; |
|
| 76 | else |
|
| 77 | Errors::instance()->display_db_error(); |
|
| 78 | } |
|
| 79 | ||
| 80 | self::$_db->_connection = $connection; |
|
| 81 | ||
| @@ 83-89 (lines=7) @@ | ||
| 80 | $connection = @pg_connect('host=' . $db_server . $db_port . ' dbname=' . $db_name . ' user=\'' . $db_user . '\' password=\'' . $db_passwd . '\''); |
|
| 81 | ||
| 82 | // Something's wrong, show an error if its fatal (which we assume it is) |
|
| 83 | if (!$connection) |
|
| 84 | { |
|
| 85 | if (!empty($db_options['non_fatal'])) |
|
| 86 | return null; |
|
| 87 | else |
|
| 88 | Errors::instance()->display_db_error(); |
|
| 89 | } |
|
| 90 | ||
| 91 | self::$_db->_connection = $connection; |
|
| 92 | ||