Bugs item #1757608, was opened at 2007-07-20 16:40
Message generated for change (Comment added) made by windkiel
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=377408&aid=1757608&group_id=23067
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Data Export
Group: 2.10.3
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Jasper Knockaert (jknockaert)
Assigned to: Nobody/Anonymous (nobody)
Summary: Empty fields in query export to Open Document Spreadsheet
Initial Comment:
When exporting the results of a query to an Open Document Spreadsheet, the content of some fields does not make it to the document.
Steps to reproduce:
1) create a test table:
CREATE TABLE test (id tinyint(2) unsigned NOT NULL auto_increment, a tinyint(2) unsigned NOT NULL, b tinyint(2) unsigned NOT NULL, PRIMARY KEY (id)) ENGINE=MyISAM DEFAULT CHARSET=latin1;
2) enter a couple of records with values for a and b, e.g.
INSERT INTO test (a,b) VALUES (1,1),(2,3);
3) go to the table in phpmyadmin and hit the sql tab and enter the query:
select *,a+b as sum from test;
4) in the "query results operations" box click on export
5) choose "open document spreadsheet" as the export format and check the option to have the field names at the first row
6) start the export and open the document: you will see that for the "sum" field no values are included
----------------------------------------------------------------------
Comment By: Jürgen Wind (windkiel)
Date: 2007-07-21 22:29
Message:
Logged In: YES
user_id=1383652
Originator: NO
yes,
on http://pma.cihar.com/STABLE/ = 2.10.3 I can confirm that neither summe
nor `sum` do work as intended.
pma 2.11 will be released soon.
but anyway - reserved words always have to be backticked.
----------------------------------------------------------------------
Comment By: Jasper Knockaert (jknockaert)
Date: 2007-07-21 20:30
Message:
Logged In: YES
user_id=1849786
Originator: YES
You are running a different version of phpmyadmin on your test server. On
2.10.3 substituting summe or `sum` for sum does not make much of a
difference: the field values are not included in the unzipped xml.
The second point may be an Openoffice bug, anyway it's not the focus of
this bug report.
----------------------------------------------------------------------
Comment By: Jürgen Wind (windkiel)
Date: 2007-07-21 20:12
Message:
Logged In: YES
user_id=1383652
Originator: NO
>That doesn't seem to solve the problem.
Working with backticks seems to solve the problem on the demo server ;)
http://pma.cihar.com/trunk-config/?db=test&table=test
At least are the values included in the unzipped xml file which was not
the case with the reserved word "sum" (unticked). The german "summe" worked
even without backticks ;) I neither have Excel nor Openoffice at hand to
check your second point.
----------------------------------------------------------------------
Comment By: Jasper Knockaert (jknockaert)
Date: 2007-07-21 14:39
Message:
Logged In: YES
user_id=1849786
Originator: YES
That doesn't seem to solve the problem.
Maybe it is useful to mention that using the Microsoft Excel 2000 format
is not a workaround, since Openoffice recognises the resulting file as a
webpage rather than a spreadsheet.
----------------------------------------------------------------------
Comment By: Jürgen Wind (windkiel)
Date: 2007-07-21 09:59
Message:
Logged In: YES
user_id=1383652
Originator: NO
use
select *,a+b as `sum` from test;
since sum is a reserved word
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=377408&aid=1757608&group_id=23067
|