Vergleich inc/db_sqlite3.php - 1.4.2 - 1.4.4

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/license.php
*

 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/license.php
*

 * $Id: db_sqlite3.php 4067 2008-08-04 03:59:08Z Tikitiki $

 * $Id: db_sqlite3.php 4224 2008-10-05 11:17:04Z Tikitiki $

 */

class DB_SQLite3

 */

class DB_SQLite3

Zeile 180Zeile 180
				}
else
{

				}
else
{

					$query = $this->alter_table_parse($tablename, $alterdefs);

					$query = $this->alter_table_parse($tablename, $alterdefs, $string);

				}
}
}

				}
}
}

Zeile 964Zeile 964
	 * @param string The table (optional)
* @return integer the total size of all mysql tables or a specific table
*/

	 * @param string The table (optional)
* @return integer the total size of all mysql tables or a specific table
*/

	function alter_table_parse($table, $alterdefs)

	function alter_table_parse($table, $alterdefs, $fullquery="")

	{

	{

 
		if(!$fullquery)
{
$fullquery = " ... {$alterdefs}";
}

if(!defined("TIME_NOW"))
{
define("TIME_NOW", time());
}


		if($alterdefs != '')
{
$result = $this->query("SELECT sql,name,type FROM sqlite_master WHERE tbl_name = '{$table}' ORDER BY type DESC");

		if($alterdefs != '')
{
$result = $this->query("SELECT sql,name,type FROM sqlite_master WHERE tbl_name = '{$table}' ORDER BY type DESC");

Zeile 1045Zeile 1055
							}
else
{

							}
else
{

								$this->error($alterdefs, 'unknown column "'.$defparts[1].'" in "'.$table.'"', E_USER_WARNING);

								$this->error($fullquery, 'unknown column "'.$defparts[1].'" in "'.$table.'"', E_USER_WARNING);

								return false;
}
break;
case 'drop':
if(sizeof($defparts) < 2)
{

								return false;
}
break;
case 'drop':
if(sizeof($defparts) < 2)
{

								$this->error($alterdefs, 'near "'.$defparts[0].($defparts[1] ? ' '.$defparts[1] : '').'": syntax error');

								$this->error($fullquery, 'near "'.$defparts[0].($defparts[1] ? ' '.$defparts[1] : '').'": syntax error');

								return false;
}


								return false;
}


Zeile 1073Zeile 1083
							}
else
{

							}
else
{

								$this->error($alterdefs, 'unknown column "'.$defparts[1].'" in "'.$table.'"');

								$this->error($fullquery, 'unknown column "'.$defparts[1].'" in "'.$table.'"');

								return false;
}
break;
default:

								return false;
}
break;
default:

							$this->error($alterdefs, 'near "'.$prevword.'": syntax error');

							$this->error($fullquery, 'near "'.$prevword.'": syntax error');

							return false;
}


							return false;
}


Zeile 1122Zeile 1132
			}
else
{

			}
else
{

				$this->error($alterdefs, 'no such table: '.$table);

				$this->error($fullquery, 'no such table: '.$table);

				return false;
}
return true;

				return false;
}
return true;