You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$app->log('Unable to connect to the database'.mysql_error($link), LOGLEVEL_DEBUG);
561
+
$app->log('Unable to connect to the database'.mysqli_error($link), LOGLEVEL_DEBUG);
562
562
return;
563
563
}
564
564
/* Get database-size from information_schema */
565
-
$result=mysql_query("SELECT SUM(data_length+index_length) FROM information_schema.TABLES WHERE table_schema='".mysql_real_escape_string($database_name)."';", $link);
565
+
$result=mysqli_query("SELECT SUM(data_length+index_length) FROM information_schema.TABLES WHERE table_schema='".mysqli_real_escape_string($database_name)."';", $link);
566
566
$this->close;
567
567
if (!$result) {
568
-
$app->log('Unable to get the database-size'.mysql_error($link), LOGLEVEL_DEBUG);
568
+
$app->log('Unable to get the database-size'.mysqli_error($link), LOGLEVEL_DEBUG);
$app->log('Unable to connect to the database'.mysql_error($link), LOGLEVEL_ERROR);
251
+
$app->log('Unable to connect to the database'.mysqli_error($link), LOGLEVEL_ERROR);
252
252
return;
253
253
}
254
254
255
255
$query_charset_table = '';
256
256
257
257
//* Create the new database
258
-
if (mysql_query('CREATE DATABASE '.mysql_real_escape_string($db_config['database_name']).$query_charset_table, $link)) {
258
+
if (mysqli_query($link,'CREATE DATABASE '.mysqli_real_escape_string($link, $db_config['database_name']).$query_charset_table, $link)) {
259
259
$app->log('Created MySQL database: '.$db_config['database_name'], LOGLEVEL_DEBUG);
260
260
} else {
261
-
$app->log('Unable to connect to the database'.mysql_error($link), LOGLEVEL_ERROR);
261
+
$app->log('Unable to connect to the database'.mysqli_error($link), LOGLEVEL_ERROR);
262
262
}
263
263
264
-
if(mysql_query("GRANT ALL ON ".mysql_real_escape_string($db_config['database_name'], $link).".* TO '".mysql_real_escape_string($db_config['database_user'], $link)."'@'".$db_config['database_host']."' IDENTIFIED BY '".mysql_real_escape_string($db_config['database_password'], $link)."';", $link)) {
264
+
if(mysqli_query("GRANT ALL ON ".mysqli_real_escape_string($link, $db_config['database_name']).".* TO '".mysqli_real_escape_string($link, $db_config['database_user'])."'@'".$db_config['database_host']."' IDENTIFIED BY '".mysqli_real_escape_string($link, $db_config['database_password'])."';", $link)) {
265
265
$app->log('Created MySQL user: '.$db_config['database_user'], LOGLEVEL_DEBUG);
266
266
} else {
267
-
$app->log('Unable to create database user'.$db_config['database_user'].''.mysql_error($link), LOGLEVEL_ERROR);
267
+
$app->log('Unable to create database user'.$db_config['database_user'].''.mysqli_error($link), LOGLEVEL_ERROR);
0 commit comments