本文整理匯總了PHP中backupbuddy_core::dbescape方法的典型用法代碼示例。如果您正苦於以下問題:PHP backupbuddy_core::dbescape方法的具體用法?PHP backupbuddy_core::dbescape怎麽用?PHP backupbuddy_core::dbescape使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類backupbuddy_core
的用法示例。
在下文中一共展示了backupbuddy_core::dbescape方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: foreach
pb_backupbuddy::status('message', 'Replacing in all tables based on settings.');
$results = $wpdb->get_results("SHOW TABLES", ARRAY_A);
foreach ($results as $result) {
pb_backupbuddy::status('message', 'Replacing in table `' . $result[0] . '`.');
$dbreplace->bruteforce_table($result[0], array($needle), array($replacement));
}
pb_backupbuddy::status('message', 'Replacement finished.');
} elseif (pb_backupbuddy::_POST('table_selection') == 'single_table') {
$table = backupbuddy_core::dbescape(pb_backupbuddy::_POST('table'));
// Single specified table.
pb_backupbuddy::status('message', 'Replacing in single table `' . $table . '` based on settings.');
$dbreplace->bruteforce_table($table, array($needle), array($replacement));
pb_backupbuddy::status('message', 'Replacement finished.');
} elseif (pb_backupbuddy::_POST('table_selection') == 'prefix') {
// Matching table prefix.
$prefix = backupbuddy_core::dbescape(pb_backupbuddy::_POST('table_prefix'));
pb_backupbuddy::status('message', 'Replacing in all tables matching prefix `' . $prefix . '`.');
$escaped_prefix = str_replace('_', '\\_', $prefix);
$results = $wpdb->get_results("SHOW TABLES LIKE '{$escaped_prefix}%'", ARRAY_A);
foreach ($results as $result) {
pb_backupbuddy::status('message', 'Replacing in table `' . $result[0] . '`.');
$dbreplace->bruteforce_table($result[0], array($needle), array($replacement));
}
pb_backupbuddy::status('message', 'Replacement finished.');
} else {
echo '<script type="text/javascript">jQuery("#pb_importbuddy_working").hide();</script>';
die('Error #4456893489349834. Unknown method.');
}
echo '<script type="text/javascript">jQuery("#pb_importbuddy_working").hide();</script>';
echo '<br><a href="' . pb_backupbuddy::page_url() . '&parent_config=' . htmlentities(pb_backupbuddy::_GET('parent_config')) . '" class="button secondary-button">← ' . __('back', 'it-l10n-backupbuddy') . '</a>';
$pb_backupbuddy_js_status = false;