Menu

#446 (ok 3.2) Result sorting

closed-accepted
1
2009-06-15
2009-01-30
Virsacer
No

The check for metadata "orgname" is wrong so the sort link is incomplete:
SELECT COUNT(*) AS `Rows`, `type` FROM `table` GROUP BY `type`

If a query contains an ORDER BY without the table name there are no sort-arrows:
SELECT COUNT(*) AS `Rows`, `type` FROM `table` GROUP BY `type` ORDER BY `type`

Discussion

  • Virsacer

    Virsacer - 2009-01-30
     
  • Virsacer

    Virsacer - 2009-01-31

    better solution

     
  • Marc Delisle

    Marc Delisle - 2009-02-01
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2009-02-01
    • assigned_to: lem9 --> nobody
     
  • Michal Čihař

    Michal Čihař - 2009-03-03

    Why did you remove strlen($fields_meta[$i]->table)?

    Also some comment what does the if actually do would be welcome.

     
  • Virsacer

    Virsacer - 2009-03-03

    I replaced "isset && strlen" by "!empty"...

    And my "if" adds the name of the table to the compare-string if it is not already in it.

     
  • Marc Delisle

    Marc Delisle - 2009-03-03

    Some time ago we replaced the "! empty" syntax with "strlen()" to catch the case of a table name "0".

     
  • Virsacer

    Virsacer - 2009-03-03

    Well then both have to be "strlen"...

    The "isset" is not neccessary - it can only have a length if it is set...

     
  • Virsacer

    Virsacer - 2009-03-03

    Updated

     
  • Marc Delisle

    Marc Delisle - 2009-03-04

    If $fields_meta[$i]->table is not set, you get a notice if you call strlen() on it.

     
  • Virsacer

    Virsacer - 2009-03-05

    Ok, I updated my patch...

     
  • Virsacer

    Virsacer - 2009-03-05

    updated

     
  • Marc Delisle

    Marc Delisle - 2009-03-17
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2009-03-17

    Merged in subversion, thanks.

     
  • Marc Delisle

    Marc Delisle - 2009-03-17
    • priority: 5 --> 1
    • summary: Result sorting --> (ok 3.2) Result sorting
    • status: open --> open-accepted
     
  • Marc Delisle

    Marc Delisle - 2009-06-15
    • status: open-accepted --> closed-accepted
     
MongoDB Logo MongoDB