> SELECT RTRIM(CONCAT(parents, ' ')) AS parents, name FROM Categories ORDER BY
> parents, name;
> 
> Note:
> 
>   SELECT RTRIM(parents) AS parents, name FROM Categories ORDER BY parents,
>   name; 
> 
>   works SOMETIMES, but not in every case.

Ammending this, as I did a little more testing..   Using RTRIM(parents)
instead of RTRIM(CONCAT(parents, ' ')) only works when querying from
non-joined tables.

The instant I join my Categories table to my Items table (left/right
unimportant, they behave the same; though with my setup, I need to do a LEFT
JOIN), it stops working and behaves just like the straight "parents" call,
requiring me to use RTRIM(CONCAT(parents, ' ')) to get a reliable sort.


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to