本文整理匯總了PHP中PMA_getDeleteDataOrTablelink函數的典型用法代碼示例。如果您正苦於以下問題:PHP PMA_getDeleteDataOrTablelink函數的具體用法?PHP PMA_getDeleteDataOrTablelink怎麽用?PHP PMA_getDeleteDataOrTablelink使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了PMA_getDeleteDataOrTablelink函數的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: PMA_getHtmlForDeleteDataOrTable
/**
* Get HTML for Delete data or table (truncate table, drop table)
*
* @param array $truncate_table_url_params url parameter array for truncate table
* @param array $dropTableUrlParams url parameter array for drop table
*
* @return string $html_output
*/
function PMA_getHtmlForDeleteDataOrTable($truncate_table_url_params, $dropTableUrlParams)
{
$html_output = '<div class="operations_half_width">' . '<fieldset class="caution">' . '<legend>' . __('Delete data or table') . '</legend>';
$html_output .= '<ul>';
if (!empty($truncate_table_url_params)) {
$html_output .= PMA_getDeleteDataOrTablelink($truncate_table_url_params, 'TRUNCATE_TABLE', __('Empty the table (TRUNCATE)'), 'truncate_tbl_anchor');
}
if (!empty($dropTableUrlParams)) {
$html_output .= PMA_getDeleteDataOrTablelink($dropTableUrlParams, 'DROP_TABLE', __('Delete the table (DROP)'), 'drop_tbl_anchor');
}
$html_output .= '</ul></fieldset></div>';
return $html_output;
}
示例2: testGetDeleteDataOrTablelink
/**
* Test for PMA_getDeleteDataOrTablelink
*
* @return void
*/
public function testGetDeleteDataOrTablelink()
{
$this->assertRegExp('/.*TRUNCATE.TABLE.foo.*id_truncate.*Truncate table.*/m', PMA_getDeleteDataOrTablelink(array("sql" => 'TRUNCATE TABLE foo'), "TRUNCATE_TABLE", "Truncate table", "id_truncate"));
}