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


PHP mysql_class::arabicToPersian方法代码示例

本文整理汇总了PHP中mysql_class::arabicToPersian方法的典型用法代码示例。如果您正苦于以下问题:PHP mysql_class::arabicToPersian方法的具体用法?PHP mysql_class::arabicToPersian怎么用?PHP mysql_class::arabicToPersian使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mysql_class的用法示例。


在下文中一共展示了mysql_class::arabicToPersian方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: ex_sqlx

 public function ex_sqlx($sql, $close = TRUE)
 {
     $sql = mysql_class::arabicToPersian($sql);
     $conf = new conf();
     $host = $conf->host;
     $db = $conf->db;
     $user = $conf->user;
     $pass = $conf->pass;
     if (isset($this) && get_class($this) == __CLASS__) {
         if (isset($this->ex_db) && $this->ex_db) {
             $host = $this->host;
             $user = $this->user;
             $pass = $this->pass;
             $db = $this->db;
         }
     }
     $table = $this->tableFromQuery($sql);
     if (!in_array($table, $this->hotTable) && $this->enableCache) {
         $cache = new cache_class($table, '');
         $cache->delete();
     }
     $out = "ok";
     $q = NULL;
     $conn = mysql_connect($host, $user, $pass);
     if (!($conn == FALSE)) {
         if (!(mysql_select_db($db, $conn) == FALSE)) {
             mysql_query("SET NAMES 'utf8'");
             mysql_query($sql, $conn);
             if ($close) {
                 mysql_close($conn);
             } else {
                 $out = $conn;
             }
         } else {
             $out = "Select DB Error.";
         }
     } else {
         $out = "Connect MySql Error.";
     }
     return $out;
 }
开发者ID:hscomp2002,项目名称:superp,代码行数:41,代码来源:mysql_class.php

示例2: directQueryx

 public function directQueryx($sql)
 {
     /*
        $conf= new conf;
        $host = $conf->host;
        $db =$conf->db;
        $user = $conf->user;
        $pass = $conf->pass;
        if(isset($this) && get_class($this) == __CLASS__)
        {
                if(isset($this->ex_db) && $this->ex_db)
                {
                        $host = $this->host;
                        $user = $this->user;
                        $pass = $this->pass;
                        $db = $this->db;
                }
        }
     //			$db = $this->convertDB($sql);
        $out = "ok";
        $q = NULL;
     			$db = $this->convertDB($sql,$db);
     			$sql = $this->convertQuery(mysql_class::arabicToPersian($sql));
        $conn = mysql_connect($host,$user,$pass);
        if(!($conn==FALSE)){
                if(!(mysql_select_db($db,$conn)==FALSE)){
                        mysql_query("SET NAMES 'utf8'");
                        mysql_query($sql,$conn);
                        mysql_close($conn);
                }else
                        $out = "Select DB Error.";
        }else
                $out = "Connect MySql Error.";
     * 
     */
     $this->load->database();
     $sql = $this->convertQuery(mysql_class::arabicToPersian($sql));
     $this->db->query($sql);
     return $this->db->insert_id();
 }
开发者ID:jnaroogheh,项目名称:darvishi,代码行数:40,代码来源:mysql_class.php


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