Hello, I have a colum as varchar with entries like MD1-1, SD1-10, MD1-4354, KD2-998, ...
Now I have a problem with sorting them, because they are treated as a string (f.e. MD1-1 is bigger than KD-998). My order query: $order = "SUBSTRING_INDEX(b.objektname, '-', 1)"; // getting everithing left of the "-" $order .= ", RIGHT(b.objektname, LENGTH(b.objektname) - LOCATE(b.objektname))"; // try to get everything right of the "-". I am getting an SQL-Error. Could you help me? Thanks, Jürgen --------------------------------------------------------------------- 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