git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/plugin@986
1ca29b6e-896d-4ea0-84a5-
967f57386b96
<?php\r
/****************************************\r
* SQLite-MySQL wrapper for Nucleus *\r
<?php\r
/****************************************\r
* SQLite-MySQL wrapper for Nucleus *\r
* Written by Katsumi *\r
****************************************/\r
\r
* Written by Katsumi *\r
****************************************/\r
\r
require_once dirname(__FILE__) . '/sqliteconfig.php';\r
$SQLITE_DBHANDLE=sqlite_open($SQLITECONF['DBFILENAME']);\r
require_once dirname(__FILE__) . '/sqlitequeryfunctions.php';\r
require_once dirname(__FILE__) . '/sqliteconfig.php';\r
$SQLITE_DBHANDLE=sqlite_open($SQLITECONF['DBFILENAME']);\r
require_once dirname(__FILE__) . '/sqlitequeryfunctions.php';\r
-$SQLITECONF['VERSION']='0.9.0.4';\r
+$SQLITECONF['VERSION']='0.9.0.5';\r
\r
//Following thing may work if MySQL is NOT installed in server.\r
if (!function_exists('mysql_query')) {\r
\r
//Following thing may work if MySQL is NOT installed in server.\r
if (!function_exists('mysql_query')) {\r
if (strpos($query,"\xEF\xBB\xBF")===0) $query=substr($query,3);// UTF-8 stuff\r
if (substr($query,-1)==';') $query=substr($query,0,strlen($query)-1);\r
\r
if (strpos($query,"\xEF\xBB\xBF")===0) $query=substr($query,3);// UTF-8 stuff\r
if (substr($query,-1)==';') $query=substr($query,0,strlen($query)-1);\r
\r
+ // Remove MySQL specific comment, '-- '.\r
+ $query=preg_replace('/($|[\r\n])\-\-[\s^\r\n]([^\r\n]*)/','',$query);\r
+ \r
// Escape style is changed from MySQL type to SQLite type here.\r
// This is important to avoid possible SQL-injection.\r
$strpositions=array();// contains the data show where the strings are (startposition => endposition)\r
// Escape style is changed from MySQL type to SQLite type here.\r
// This is important to avoid possible SQL-injection.\r
$strpositions=array();// contains the data show where the strings are (startposition => endposition)\r