|
Posted by naixn on 12/08/06 00:22
GarryJones wrote :
> [...]
You can do your query like this :
SELECT
*, DATE(CONCAT('2007', ml_mna, '-', ml_dya)) AS thedate
FROM
ml_lopp
LEFT JOIN
scfmforening
ON
(scfmforening.scfmnum = ml_lopp.scfmnum)
LEFT JOIN
ml_tidplats
ON
(ml_tidplats.loppnum = ml_lopp.loppnum)
ORDER BY
thedate
This idea is to concatenate 2007, the month, and the day, then you get
2007-2-1 for the 1st of january, and the function :
DATE() receives it [ DATE('2007-2-1') ] and return :
2007-02-01
And this value is put in "thedate", which is used for the sorting ;)
Could you try and tell the result?
--
Naixn
http://fma-fr.net
Navigation:
[Reply to this message]
|