Posted by Moot on 12/11/06 18:15
GarryJones wrote:
> I think the following statement ....
>
> $ml_collect='SELECT *, DATE(CONCAT(field1, field2)) 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';
>
> ....would work if "field1" and "field2" were in the table "ml_lopp"
>
> However, "field1" and "field2" are in the table "ml_tidplats" and
> accessed by "LEFT JOIN".
>
> So, how do I use "DATE(CONCAT(field1, field2))" in this case?
>
> Garry Jones
> Sweden
Did you already try this and it *didn't* work? Because I just tried a
simple example in MySQL and it worked as expected (the fields concated
regardless of their source table).
[Back to original message]
|