When exporting to a SQL query phpMyAdmin will break
functions into multiple columns. It will then remove
the same ammount of columns passed to the funciton from
the end of the column list.
ex:
SELECT
CONCAT( 'DOMAIN\\' , `username` ) AS 'uname',
'fullname';
will export a query:
INSERT INTO table
(
`DOMAIN\\`,
`username`)
VALUES
(
'DOMAIN\\john',
'John Doe'
);
instead of ...table (`uname`,`fullname`) values...
Similarly, phpMyAdmin doesnt recognise renamed columns
in the export:
select `name` as 'fullname' where 1;
will export:
insert into table ('name') values ('John Doe');
Logged In: YES
user_id=326580
1.) can not reproduce, there is no SQL export for this type
of query
2.) SQL Export is to export a whole table, you should use
CSV Export
moved to RFE:
when exporting a query, there should be an option to use the
aliases from the query as column and table names
and make the create table statment only with fields in the query
Implemented with https://github.com/phpmyadmin/phpmyadmin/commit/ae6875c81e62454da153d538e0e407bca6a0c581