⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 parsingquery.class.php

📁 架設ROSE私服必備之物 ROSE數據庫
💻 PHP
字号:
<?php/*** Web based SQLite management** @package SQLiteManager* @author Fr閐閞ic HENNINOT* @version $Id: ParsingQuery.class.php,v 1.41 2006/04/16 12:23:37 freddy78 Exp $ $Revision: 1.41 $*/class ParsingQuery {	/**	* Current Query	*	* @var string	* @access private	*/	var $query;	/**	* query formated type	* 1 = SQLite , 2 = MySQL	*	* @access private	* @var bool	*/	var $type;	/**	* All user string in an array	*	* @access private	* @var array	*/	var $tabString;	/**	* Query with format string included	*	* @access private	* @var string	*/	var $formattedQuery;	/**	* array of all query component	*	* @access private	* @var array	*/	var $explodedQuery;	/**	* Constructor of the class	*	* @param string $query Query string command	* @param int $type type export selector	*/	function ParsingQuery($query, $type){		$this->query = $query;		$this->type = $type;	}	/**	* Convert MySQL query to SQLite query	*	* @access public	*/	function tabletoSQLite($query){		$query = eregi_replace('auto_increment=(.*)[[:space:]];', ';', $query);		$query = eregi_replace('[[:space:]]UNSIGNED[[:space:]]', ' ', $query);		$query = eregi_replace('TYPE=(.*)[[:space:]];', ';', $query);		$query = str_replace("\n", ' ', $query);		$startPar = strpos($query, '(');		$endPar = strrpos($query, ')');		preg_match('/TABLE[[:space:]](.*)[[:space:]]\(/i', substr($query, 0, ($startPar+1)), $result);		$tableName = ereg_replace('\[|\]','',$result[1]);		$tableElement = explode(',', substr($query, $startPar+1, ($endPar - $startPar)-1));		$numElement = 0;		$primaryExist = false;		while(list($key, $value)=each($tableElement)){			$numElement++;			if(eregi('not[[:space:]]null', $value)) {				$matches = 'not[[:space:]]null';				$defineElement[$numElement]['null'] = false;			}			if($matches) $value = eregi_replace($matches, '', $value);			if(!eregi('[[:space:]]key[[:space:]]', $value)){				$value = $this->bracketsReplaceSpaces($value,'@

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -