当前位置: 首页>>代码示例>>PHP>>正文


PHP PMA_SQP_formatNone函数代码示例

本文整理汇总了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;
 }
开发者ID:Apxe,项目名称:Rubin_final,代码行数:52,代码来源:common.lib.php

示例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);
 }
开发者ID:BackupTheBerlios,项目名称:vhcs-svn,代码行数:16,代码来源:sqlparser.lib.php

示例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);
 }
开发者ID:madr,项目名称:urban-octo-rotary-phone,代码行数:14,代码来源:sqlparser.lib.php

示例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
开发者ID:blumenbach,项目名称:blumenbach-online.de,代码行数:14,代码来源:sqlparser.lib.php

示例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
开发者ID:ObaoziO,项目名称:baozi,代码行数:62,代码来源:Util.class.php


注:本文中的PMA_SQP_formatNone函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。