Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysqli #340

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions drush/civicrm.drush.inc
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,9 @@ function _civicrm_install_db($dbuser, $dbpass, $dbhost, $dbname,
$siteRoot = drush_get_context('DRUSH_DRUPAL_SITE_ROOT', FALSE);

$sqlPath = "$modPath/civicrm/sql";
$conn = @mysql_connect($dbhost, $dbuser, $dbpass);
if (!@mysql_select_db($dbname) &&
!@mysql_query("CREATE DATABASE $database")
$conn = new mysqli($dbhost, $dbuser, $dbpass);
if ($conn->select_db($dbname) &&
!$conn->query("CREATE DATABASE $database")
) {
drush_die(dt('CiviCRM database was not found. Failed to create one.'));
}
Expand Down