コード例 #1
0
ファイル: dbconnection.php プロジェクト: Ermile/Saloos
 public function query($string)
 {
     // if(self::$db_lang = 'fa_IR')
     // {
     // 	$patterns = array(
     // 		'/ة/',
     // 		'/إ/',
     // 		'/أ/',
     // 		'/ي/',
     // 		'/ئ/',
     // 		'/ؤ/',
     // 		'/ك/'
     // 	);
     // 	$replacements = array(
     // 		'ه',
     // 		'ا',
     // 		'ا',
     // 		'ی',
     // 		'ی',
     // 		'و',
     // 		'ک'
     // 	);
     // 	$string = preg_replace($patterns, $replacements, $string);
     // }
     // $patterns = array(
     // 	'/۰/',
     // 	'/۱/',
     // 	'/۲/',
     // 	'/۳/',
     // 	'/۴/',
     // 	'/۵/',
     // 	'/۶/',
     // 	'/۷/',
     // 	'/۸/',
     // 	'/۹/'
     // );
     // $replacements = array(
     // 	'0',
     // 	'1',
     // 	'2',
     // 	'3',
     // 	'4',
     // 	'5',
     // 	'6',
     // 	'7',
     // 	'8',
     // 	'9'
     // );
     // $string = preg_replace($patterns, $replacements, $string);
     if (DEBUG) {
         \lib\db::log($string);
     }
     if (debug::$status) {
         $this->string = $string;
         $this->result = self::$connection->query($string);
         if (self::$connection->error) {
             $this->status = false;
             $this->error(self::$connection->error, self::$connection->errno);
         }
     }
     return $this;
 }