本文整理匯總了PHP中DUPX_Log::Error方法的典型用法代碼示例。如果您正苦於以下問題:PHP DUPX_Log::Error方法的具體用法?PHP DUPX_Log::Error怎麽用?PHP DUPX_Log::Error使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DUPX_Log
的用法示例。
在下文中一共展示了DUPX_Log::Error方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: while
@mysqli_autocommit($dbh, true);
DUPX_Log::Info("ERRORS FOUND:\t{$dbquery_errs}");
DUPX_Log::Info("DROP TABLE:\t{$drop_log}");
DUPX_Log::Info("QUERIES RAN:\t{$dbquery_rows}\n");
$dbtable_count = 0;
if ($result = mysqli_query($dbh, "SHOW TABLES")) {
while ($row = mysqli_fetch_array($result, MYSQLI_NUM)) {
$table_rows = DupUtil::table_row_count($dbh, $row[0]);
$dbtable_rows += $table_rows;
DUPX_Log::Info("{$row[0]}: ({$table_rows})");
$dbtable_count++;
}
@mysqli_free_result($result);
}
if ($dbtable_count == 0) {
DUPX_Log::Error("No tables where created during step 1 of the install. Please review the installer-log.txt file for sql error messages.\n\t\tYou may have to manually run the installer-data.sql with a tool like phpmyadmin to validate the data input. If you have enabled compatibility mode\n\t\tduring the package creation process then the database server version your using may not be compatible with this script.\n");
}
//DATA CLEANUP: Perform Transient Cache Cleanup
//Remove all duplicator entries and record this one since this is a new install.
$dbdelete_count = 0;
@mysqli_query($dbh, "DELETE FROM `{$GLOBALS['FW_TABLEPREFIX']}duplicator_packages`");
$dbdelete_count1 = @mysqli_affected_rows($dbh) or 0;
@mysqli_query($dbh, "DELETE FROM `{$GLOBALS['FW_TABLEPREFIX']}options` WHERE `option_name` LIKE ('_transient%') OR `option_name` LIKE ('_site_transient%')");
$dbdelete_count2 = @mysqli_affected_rows($dbh) or 0;
$dbdelete_count = abs($dbdelete_count1) + abs($dbdelete_count2);
DUPX_Log::Info("Removed '{$dbdelete_count}' cache/transient rows");
//Reset Duplicator Options
foreach ($GLOBALS['FW_OPTS_DELETE'] as $value) {
mysqli_query($dbh, "DELETE FROM `{$GLOBALS['FW_TABLEPREFIX']}options` WHERE `option_name` = '{$value}'");
}
@mysqli_close($dbh);
示例2: mysqli_select_db
mysqli_select_db($dbh, $_POST['dbname']) or DUPX_Log::Error(sprintf(ERR_DBCONNECT_CREATE, $_POST['dbname']));
break;
case "empty":
//DROP DB TABLES
$drop_log = "Database already empty. Ready for install.";
$sql = "SHOW TABLES FROM `{$_POST['dbname']}`";
$found_tables = null;
if ($result = mysqli_query($dbh, $sql)) {
while ($row = mysqli_fetch_row($result)) {
$found_tables[] = $row[0];
}
if (count($found_tables) > 0) {
foreach ($found_tables as $table_name) {
$sql = "DROP TABLE `{$_POST['dbname']}`.`{$table_name}`";
if (!($result = mysqli_query($dbh, $sql))) {
DUPX_Log::Error(sprintf(ERR_DBTRYCLEAN, $_POST['dbname']));
}
}
}
$drop_log = 'removed (' . count($found_tables) . ') tables';
}
break;
}
//WRITE DATA
DUPX_Log::Info("--------------------------------------");
DUPX_Log::Info("DATABASE RESULTS");
DUPX_Log::Info("--------------------------------------");
$profile_start = DupUtil::get_microtime();
$fcgi_buffer_pool = 5000;
$fcgi_buffer_count = 0;
$dbquery_rows = 0;