Hi
Dne Thu, 9 Jul 2009 13:42:06 -0500 Derek Schaefer derek.schaefer@gmail.com napsal(a):
I present to you, all my code to date! If you are curious enough to look over my code, please send me any suggestions that you may have.
- An SVN diff file created against revision 12637 on July 9th
(http://downloads.moonlapse.org/pma/midterm/pma_trunk.diff.zip)
First usage comments:
- Why does it create ODS_DB? It should rather use exiting one I think (If I had selected one). - It failed on quite simple spreadsheet (created by phpMyAdmin) - http://tmp.cihar.com/City.ods
CREATE TABLE IF NOT EXISTS `City` ( ) ENGINE = MYISAM ;
With tons of warnings:
Runtime Notice in ./libraries/import/ods.php#65 Only variables should be assigned by reference
Backtrace
./import.php#376: require(./libraries/import/ods.php) Runtime Notice in ./libraries/import/ods.php#69 Only variables should be assigned by reference
Backtrace
./import.php#376: require(./libraries/import/ods.php) Notice in ./libraries/import/ods.php#85 Undefined index: ods_col_names
Backtrace
./import.php#376: require(./libraries/import/ods.php) Notice in ./libraries/import/ods.php#131 Undefined variable: max_cols
Backtrace
./import.php#376: require(./libraries/import/ods.php) Warning in ./libraries/Message.class.php#245 Missing argument 1 for PMA_Message::notice(), called in /srv/http/pma.cihar.com/gsoc-derek/libraries/import.lib.php on line 958 and defined
Backtrace
./libraries/import.lib.php#958: PMA_Message::notice() ./libraries/import/ods.php#216: PMA_buildSQL( string ODS_DB, array, array, NULL, NULL, ) ./import.php#376: require(./libraries/import/ods.php) Notice in ./libraries/Message.class.php#247 Undefined variable: string
Backtrace
./libraries/import.lib.php#958: PMA_Message::notice() ./libraries/import/ods.php#216: PMA_buildSQL( string ODS_DB, array, array, NULL, NULL, ) ./import.php#376: require(./libraries/import/ods.php) Warning in ./libraries/ob.lib.php#84 Cannot modify header information - headers already sent by (output started at /srv/http/pma.cihar.com/gsoc-derek/libraries/Message.class.php:784)
Backtrace
./libraries/ob.lib.php#84: header(string X-ob_mode: 1) ./libraries/header.inc.php#24: PMA_outBufferPre() ./libraries/common.lib.php#541: require_once(./libraries/header.inc.php) ./import.php#433: PMA_mysqlDie( string #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ENGINE=MyISAM' at line 1, string CREATE TABLE IF NOT EXISTS `City` () ENGINE=MyISAM;, string , string db_import.php?db=201.65.58.6&token=395723111a197f637d1c57533ee4da64, boolean 1, ) Warning in ./libraries/header_http.inc.php#23 Cannot modify header information - headers already sent by (output started at /srv/http/pma.cihar.com/gsoc-derek/libraries/Message.class.php:784)
Backtrace
./libraries/header_http.inc.php#23: header(string Expires: Fri, 10 Jul 2009 13:08:32 GMT) ./libraries/header.inc.php#30: require_once(./libraries/header_http.inc.php) ./libraries/common.lib.php#541: require_once(./libraries/header.inc.php) ./import.php#433: PMA_mysqlDie( string #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ENGINE=MyISAM' at line 1, string CREATE TABLE IF NOT EXISTS `City` () ENGINE=MyISAM;, string , string db_import.php?db=201.65.58.6&token=395723111a197f637d1c57533ee4da64, boolean 1, ) Warning in ./libraries/header_http.inc.php#24 Cannot modify header information - headers already sent by (output started at /srv/http/pma.cihar.com/gsoc-derek/libraries/Message.class.php:784)
Backtrace
./libraries/header_http.inc.php#24: header(string Last-Modified: Fri, 10 Jul 2009 13:08:32 GMT) ./libraries/header.inc.php#30: require_once(./libraries/header_http.inc.php) ./libraries/common.lib.php#541: require_once(./libraries/header.inc.php) ./import.php#433: PMA_mysqlDie( string #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ENGINE=MyISAM' at line 1, string CREATE TABLE IF NOT EXISTS `City` () ENGINE=MyISAM;, string , string db_import.php?db=201.65.58.6&token=395723111a197f637d1c57533ee4da64, boolean 1, ) Warning in ./libraries/header_http.inc.php#25 Cannot modify header information - headers already sent by (output started at /srv/http/pma.cihar.com/gsoc-derek/libraries/Message.class.php:784)
Backtrace
./libraries/header_http.inc.php#25: header(string Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0) ./libraries/header.inc.php#30: require_once(./libraries/header_http.inc.php) ./libraries/common.lib.php#541: require_once(./libraries/header.inc.php) ./import.php#433: PMA_mysqlDie( string #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ENGINE=MyISAM' at line 1, string CREATE TABLE IF NOT EXISTS `City` () ENGINE=MyISAM;, string , string db_import.php?db=201.65.58.6&token=395723111a197f637d1c57533ee4da64, boolean 1, ) Warning in ./libraries/header_http.inc.php#26 Cannot modify header information - headers already sent by (output started at /srv/http/pma.cihar.com/gsoc-derek/libraries/Message.class.php:784)
Backtrace
./libraries/header_http.inc.php#26: header(string Pragma: no-cache) ./libraries/header.inc.php#30: require_once(./libraries/header_http.inc.php) ./libraries/common.lib.php#541: require_once(./libraries/header.inc.php) ./import.php#433: PMA_mysqlDie( string #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ENGINE=MyISAM' at line 1, string CREATE TABLE IF NOT EXISTS `City` () ENGINE=MyISAM;, string , string db_import.php?db=201.65.58.6&token=395723111a197f637d1c57533ee4da64, boolean 1, ) Warning in ./libraries/header_http.inc.php#29 Cannot modify header information - headers already sent by (output started at /srv/http/pma.cihar.com/gsoc-derek/libraries/Message.class.php:784)
Backtrace
./libraries/header_http.inc.php#29: header(string Content-Type: text/html; charset=utf-8) ./libraries/header.inc.php#30: require_once(./libraries/header_http.inc.php) ./libraries/common.lib.php#541: require_once(./libraries/header.inc.php) ./import.php#433: PMA_mysqlDie( string #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ENGINE=MyISAM' at line 1, string CREATE TABLE IF NOT EXISTS `City` () ENGINE=MyISAM;, string , string db_import.php?db=201.65.58.6&token=395723111a197f637d1c57533ee4da64, boolean 1, )