|
Posted by GarryJones on 12/11/06 15:59
I tried that but its not working, I got Parse error: syntax error,
unexpected T_LNUMBER in
/customers/scfmotion.se/scfmotion.se/httpd.www/scfml_lst.php on line 6
I think this is because
> 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 ;)
ml_mna and ml_dya are in the table ml_tidplats and that info is
extracted with the left join function. So how can I refer to the fields
ml_mna and ml_dya ?
[Back to original message]
|