Menu

#440 (in 2.5.6) Improve browsing foreign windows

fixed
2
2013-06-11
2003-12-31
No

Hi,

I am using phpMySQL 2.5.5 on debian linux (3.0 r2), php
4.1.2, MySQL 4.0.16. Here is some bugs I discovered
when I tried to get to know foreign key functionality
in phpMyAdmin.

A)
In "insert" view it is difficult to find proper foreign
field value using "foreing browser" because available
foreign values are not sorted. I made a small
modifiacation to get_foreigners.lib.php file to correct
the sorting problem:

37c37
< . (($foreign_display == FALSE) ? '' :' ORDER BY ' .
PMA_backquote($foreign_table) . '.' .
PMA_backquote($foreign_display))
---
> . ' ORDER BY ' . PMA_backquote($foreign_table) .
'.' . PMA_backquote($foreign_field)

B)
I think that "foreign broser" window should be a little
bit wider. My browser (Mozilla 1.5) shows the scrollbar
on the bottom of the windows because the content is
wider than the browser window.

C)
Paging do not work. I can see first 200(?) foreign
values on the first page but if I try to choose the
second page I see the following error message. "Show
all" button works correctly

Warning: Supplied argument is not a valid MySQL result
resource in
/opt/phpMyAdmin255/libraries/mysql_wrappers.lib.php on
line 36

Warning: Invalid argument supplied for foreach() in
/opt/phpMyAdmin255/libraries/relation.lib.php on line 311

D)
I do not understand the meaning of the all columns in
"foreing browser". Why "Keyname" and "Description"
columns are displaied twice on table header ("Keyname",
"Description", "Show all"/Page selector,
"Description", "Keyname")

F)
If "RepeatCells" in config.inc.php is set to "0" table
header is repeated after every third row. "0" should
disable table header from repeating...

PS: I am using InnoDB foreign keys instead of
phpMyAdmin relations if it make difference

Teemu

Discussion

  • Marc Delisle

    Marc Delisle - 2004-01-02
    • assigned_to: nobody --> lem9
     
  • Garvin Hicking

    Garvin Hicking - 2004-01-02
    • assigned_to: lem9 --> garvinhicking
     
  • Garvin Hicking

    Garvin Hicking - 2004-01-02

    Logged In: YES
    user_id=473563

    (lem9, oops - seems as if we both took on the bug. As I
    won't have time before upcoming monday, I'll re-assign this
    to you - I'll see what happened on monday :-)

     
  • Garvin Hicking

    Garvin Hicking - 2004-01-02
    • assigned_to: garvinhicking --> lem9
     
  • Marc Delisle

    Marc Delisle - 2004-01-02

    Logged In: YES
    user_id=210714

    Paging problem fixed: browse_foreigners.php, line 88 becomes
    $pk_uri = '&amp;';

     
  • Marc Delisle

    Marc Delisle - 2004-01-02

    Logged In: YES
    user_id=210714

    Well, sourceforge ate my fix :)

    $ p k _ u r i = '& a m p ;';

     
  • Marc Delisle

    Marc Delisle - 2004-01-02

    Logged In: YES
    user_id=210714

    RepeatCells problem fixed: in browse_foreigners, line 156
    becomes
    if ($cfg['RepeatCells'] > 0 && $count > $cfg['RepeatCells']) {

     
  • Marc Delisle

    Marc Delisle - 2004-01-03

    Logged In: YES
    user_id=210714

    Moved to features requests (RFE).

     
  • Marc Delisle

    Marc Delisle - 2004-01-03
    • summary: "Foreign browser" bugs --> Improve browsing foreign windows
    • labels: 509097 -->
    • milestone: 365092 -->
    • assigned_to: lem9 --> nobody
     
  • Garvin Hicking

    Garvin Hicking - 2004-01-05

    Logged In: YES
    user_id=473563

    Implemented changes into CVS 2.5.6:

    A)

    This is now solved in this way: On the left side you see all
    key/value pairs sorted by key and on the right side you see
    key/value pairs sorted by value.

    The pairs are only sorted with the values that are displayed
    on a page. If you have 200 items, only 100 are shown, and
    the sorting only applies to those 100 shown items. The 100
    items that are fetched are related to the 'ORDER BY
    foreign_display' query, so every item being sorted out of
    the display is discarded.

    This is a limitation because performance-wise it wouldn't be
    good to fetch all items and sort all of those. If a user
    definitely wants to do that, he can use the 'Show All'
    button. Oppinions? Should we add this to the FAQ?

    B)

    This is impossible to fit to every user's needs. But I added
    the parameter that the browser window can be resized.

    C/F)

    Already fixed by Marc

    D)

    It's displayed twice to mark the end of the page, as a table
    footer. If you have a list of 100 items, it may be helpful
    to see which one is the key and which one the description
    field...

     
  • Garvin Hicking

    Garvin Hicking - 2004-01-05
    • assigned_to: nobody --> garvinhicking
    • labels: --> Displaying results
    • priority: 5 --> 2
    • summary: Improve browsing foreign windows --> (in 2.5.6) Improve browsing foreign windows
    • status: open --> open-fixed
     
  • Marc Delisle

    Marc Delisle - 2004-01-05

    Logged In: YES
    user_id=210714

    Garvin,

    A) exactly what I had in mind, thanks! There is a small
    problem if the display field is not defined for a relation,
    I don't know if we should bother. Show All button usage is
    ok, and it should be clear in inself. Note that by default
    this button is not active.

    B) resize parameter is OK for me.

    D) OK for me.

     
  • Marc Delisle

    Marc Delisle - 2004-03-01
    • status: open-fixed --> closed-fixed
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-fixed --> fixed