本文整理汇总了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;
}
示例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();
}