本文整理汇总了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;