Menu

#701 (ok 4.5) Print view using css

Rewrite
resolved
Normal
2015-06-01
2005-03-07
No

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.

Discussion

  • Michal Čihař

    Michal Čihař - 2005-03-08

    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.

     
  • Chris Lively

    Chris Lively - 2005-03-08

    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?

     
  • Michal Čihař

    Michal Čihař - 2005-03-08
    • summary: Print View with Variables --> Print view using css
    • labels: 509144 --> Displaying results
    • milestone: 465000 -->
     
  • Michal Čihař

    Michal Čihař - 2005-03-08

    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.

     
  • Isaac Bennetch

    Isaac Bennetch - 2014-11-16
    • labels: Displaying results --> Displaying results, gsoc
    • assigned_to: Isaac Bennetch
     
  • Deven Bansod

    Deven Bansod - 2015-05-22

    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 ?

     
  • Michal Čihař

    Michal Čihař - 2015-05-22

    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).

     
    • Isaac Bennetch

      Isaac Bennetch - 2015-05-22

      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.

       
  • Deven Bansod

    Deven Bansod - 2015-05-27

    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 ?

     
  • Isaac Bennetch

    Isaac Bennetch - 2015-06-01
    • labels: Displaying results, gsoc --> Displaying results, GSoC 2015
    • summary: Print view using css --> (ok 4.5) Print view using css
    • status: open --> resolved