本文整理汇总了PHP中PMA_SQP_formatNone函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_SQP_formatNone函数的具体用法?PHP PMA_SQP_formatNone怎么用?PHP PMA_SQP_formatNone使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PMA_SQP_formatNone函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PMA_formatSql
/**
* format sql strings
*
* @param mixed pre-parsed SQL structure
*
* @return string the formatted sql
*
* @global array the configuration array
* @global boolean whether the current statement is a multiple one or not
*
* @access public
*
* @author Robin Johnson <robbat2@users.sourceforge.net>
*/
function PMA_formatSql($parsed_sql, $unparsed_sql = '')
{
global $cfg;
// Check that we actually have a valid set of parsed data
// well, not quite
// first check for the SQL parser having hit an error
if (PMA_SQP_isError()) {
return $parsed_sql;
}
// then check for an array
if (!is_array($parsed_sql)) {
// We don't so just return the input directly
// This is intended to be used for when the SQL Parser is turned off
$formatted_sql = '<pre>' . "\n" . ($cfg['SQP']['fmtType'] == 'none' && $unparsed_sql != '' ? $unparsed_sql : $parsed_sql) . "\n" . '</pre>';
return $formatted_sql;
}
$formatted_sql = '';
switch ($cfg['SQP']['fmtType']) {
case 'none':
if ($unparsed_sql != '') {
$formatted_sql = "<pre>\n" . PMA_SQP_formatNone(array('raw' => $unparsed_sql)) . "\n</pre>";
} else {
$formatted_sql = PMA_SQP_formatNone($parsed_sql);
}
break;
case 'html':
$formatted_sql = PMA_SQP_formatHtml($parsed_sql, 'color');
break;
case 'text':
//$formatted_sql = PMA_SQP_formatText($parsed_sql);
$formatted_sql = PMA_SQP_formatHtml($parsed_sql, 'text');
break;
default:
break;
}
// end switch
return $formatted_sql;
}
示例2: PMA_SQP_formatText
/**
* Gets SQL queries in text format
*
* @param array The SQL queries list
*
* @return string The SQL queries in text format
*
* @access public
*/
function PMA_SQP_formatText($arr)
{
/**
* TODO WRITE THIS!
*/
return PMA_SQP_formatNone($arr);
}
示例3: PMA_SQP_formatText
/**
* Gets SQL queries in text format
*
* @todo WRITE THIS!
* @param array The SQL queries list
*
* @return string The SQL queries in text format
*
* @access public
*/
function PMA_SQP_formatText($arr)
{
return PMA_SQP_formatNone($arr);
}
示例4: PMA_SQP_formatText
/**
* Gets SQL queries in text format
*
* @todo WRITE THIS!
* @param array The SQL queries list
*
* @return string The SQL queries in text format
*
* @access public
*/
function PMA_SQP_formatText($arr)
{
return PMA_SQP_formatNone($arr);
} // end of the "PMA_SQP_formatText()" function
示例5: formatSql
/**
* format sql strings
*
* @param mixed $parsed_sql pre-parsed SQL structure
* @param string $unparsed_sql raw SQL string
*
* @return string the formatted sql
*
* @global array the configuration array
* @global boolean whether the current statement is a multiple one or not
*
* @access public
* @todo move into PMA_Sql
*/
public static function formatSql($parsed_sql, $unparsed_sql = '')
{
global $cfg;
// Check that we actually have a valid set of parsed data
// well, not quite
// first check for the SQL parser having hit an error
if (PMA_SQP_isError()) {
return htmlspecialchars($parsed_sql['raw']);
}
// then check for an array
if (! is_array($parsed_sql)) {
// We don't so just return the input directly
// This is intended to be used for when the SQL Parser is turned off
$formatted_sql = "<pre>\n";
if (($cfg['SQP']['fmtType'] == 'none') && ($unparsed_sql != '')) {
$formatted_sql .= $unparsed_sql;
} else {
$formatted_sql .= $parsed_sql;
}
$formatted_sql .= "\n</pre>";
return $formatted_sql;
}
$formatted_sql = '';
switch ($cfg['SQP']['fmtType']) {
case 'none':
if ($unparsed_sql != '') {
$formatted_sql = '<span class="inner_sql"><pre>' . "\n"
. PMA_SQP_formatNone(array('raw' => $unparsed_sql)) . "\n"
. '</pre></span>';
} else {
$formatted_sql = PMA_SQP_formatNone($parsed_sql);
}
break;
case 'html':
$formatted_sql = PMA_SQP_formatHtml($parsed_sql, 'color');
break;
case 'text':
$formatted_sql = PMA_SQP_formatHtml($parsed_sql, 'text');
break;
default:
break;
} // end switch
return $formatted_sql;
} // end of the "formatSql()" function