Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
1e5813d4
Commit
1e5813d4
authored
Oct 23, 2002
by
Dries
Browse files
- Made it possible to connect to mysql databases running on non-standard
ports. Patch by Alastair.
parent
66c5b707
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/database.mysql.inc
View file @
1e5813d4
...
...
@@ -4,6 +4,11 @@
function
db_connect
(
$url
)
{
$url
=
parse_url
(
$url
);
// Allow for non-standard MySQL port.
if
(
$url
[
"port"
])
{
$url
[
"host"
]
=
$url
[
"host"
]
.
":"
.
$url
[
"port"
];
}
mysql_pconnect
(
$url
[
"host"
],
$url
[
"user"
],
$url
[
"pass"
])
or
die
(
mysql_error
());
mysql_select_db
(
substr
(
$url
[
"path"
],
1
))
or
die
(
"unable to select database"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment