Print view fails when using multiple commands and
variables.
Take the following example query:
----------
set @a := 0;
select @a := @a+1 as RowNum, username
from user
----------
when run from the sql tab I receive the expected
results such as
RowNum username
1, frank
2, tom
3, jerry
However, when I click on Print View, Print View (with
full texts), or Export the data I get is:
RowNum username
Null, frank
Null, tom
Null, jerry
It appears that phpMyAdmin is only passing the last
part of the query (from the select statement forward)
to the sql.php file
Chris.
Logged In: YES
user_id=192186
Export and printview work only on select, they ignore rest
of the query. It's intentional, because it works as
expected when you execute some sql script which does some
operations and last one is select. But if fails to work in
such cases.
Logged In: YES
user_id=1234551
Nijel, your response makes sense to a certain degree.
Perhaps the printview function should be removed and
replaced with a print specific style sheet which restricts
the output to the actual sql output.
Maybe this should be a feature request?
Logged In: YES
user_id=192186
Style sheet is good idea, however:
1. That won't work good with frames.
2. Thats hard to achieve with our current a bit messy
html/css code.
Anyway I move this to feature reqests, so that we can handle
this is some future version.
Hi,
Does this feature mean to replace the existing 'Print View' and 'Print View (with Full Texts) functionality's implementation OR should it add a new feature which prints the view by its style-sheet ?
AFAIR the idea was to replace it. Every page would have print media CSS which would make it printable (removing navigation, background and so on).
Yes, I agree that this is to completely replace the "Print View".
The difference between viewing full or partial texts in the print view can be determined by what's displayed on the page by "Full texts" or "Partial texts" radio buttons in the Options area; basically what the user sees on the Browse page will determine what the print view shows.
Hi, I have implemented this by one method of parsing the HTML, sending JSONs of data back to php script and outputting them in required format.
This has been done till now for db_structure.php, sql.php(all sql results).
tbl_structure.php has to be implemented. And I will do the regular thing in more or less similar way.
PR: https://github.com/phpmyadmin/phpmyadmin/pull/1697
But, what should be the implementation for mult_submits? i.e. when 2 or more tables are selected from db_structure.php and then their printviews is asked for.
Now, my method(of parsing HTML) will fail here. For this, we can resort to the original method of querying for the required info and outputting it, otherwise for a single table's printview, we can use my method.
Any suggestions ?
Implemented with https://github.com/phpmyadmin/phpmyadmin/pull/1708