本文整理匯總了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();
}