This works with PHP 5.2.4 and MySQL 5.0.45, but fails with PHP 4.4.7 and MySQL 4.1.22 (mysql_* interface, not mysqli_*). It also fails with PhpMyAdmin 2.11.0 and 2.9.2.
Here is the table in question:
CREATE TABLE IF NOT EXISTS `preference_type` (
`preference_type_id` varchar(4) NOT NULL default '',
`preference_type_desc` varchar(40) NOT NULL default '',
`created_date` datetime NOT NULL default '2001-01-01 00:00:00',
`created_user` varchar(16) NOT NULL default 'UNKNOWN',
`revised_date` datetime default NULL,
`revised_user` varchar(16) default NULL,
PRIMARY KEY (`preference_type_id`)
) TYPE=MyISAM;
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have eventually found the problem. I had ANSI_QUOTES set in my config file which means that when the result of SHOW CREATE TABLE is obtained the quote character is doublequote instead of backtick, but your code only looks for backticks which it cannot find, hence the error. I solved the problem by placing the following code:
$create_query = str_replace('"', '`', $create_query);
in phpMyAdmin-2.11.5\libraries\export\sql.php after line 475
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=1383652
Originator: NO
works very well on the demo server http://pma.cihar.com/STABLE/?pma_password=&pma_username=root
Logged In: YES
user_id=326580
Originator: NO
please provide the structure of your table (export without data)
Logged In: YES
user_id=495328
Originator: YES
This works with PHP 5.2.4 and MySQL 5.0.45, but fails with PHP 4.4.7 and MySQL 4.1.22 (mysql_* interface, not mysqli_*). It also fails with PhpMyAdmin 2.11.0 and 2.9.2.
Here is the table in question:
CREATE TABLE IF NOT EXISTS `preference_type` (
`preference_type_id` varchar(4) NOT NULL default '',
`preference_type_desc` varchar(40) NOT NULL default '',
`created_date` datetime NOT NULL default '2001-01-01 00:00:00',
`created_user` varchar(16) NOT NULL default 'UNKNOWN',
`revised_date` datetime default NULL,
`revised_user` varchar(16) default NULL,
PRIMARY KEY (`preference_type_id`)
) TYPE=MyISAM;
Logged In: YES
user_id=210714
Originator: NO
No problem copying your table to another database, with:
phpMyAdmin 2.11.1
MySQL 4.1.22
MySQL client lib 4.1.22
PHP 4.4.7
Apache 2.2.6
Linux server
Logged In: YES
user_id=1312539
Originator: NO
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
Logged In: YES
user_id=495328
Originator: YES
I have eventually found the problem. I had ANSI_QUOTES set in my config file which means that when the result of SHOW CREATE TABLE is obtained the quote character is doublequote instead of backtick, but your code only looks for backticks which it cannot find, hence the error. I solved the problem by placing the following code:
$create_query = str_replace('"', '`', $create_query);
in phpMyAdmin-2.11.5\libraries\export\sql.php after line 475
Logged In: YES
user_id=210714
Originator: NO
Thanks, I merged this different fix for 2.11.6:
http://phpmyadmin.svn.sourceforge.net/viewvc/phpmyadmin/branches/QA_2_11/phpMyAdmin/libraries/Table.class.php?r1=10923&r2=11172