Re: Weird ORDER BY problem with PHP an MS ACCESS

From: Date: Thu, 23 Mar 2006 18:52:47 +0000
Subject: Re: Weird ORDER BY problem with PHP an MS ACCESS
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-41597@lists.php.net to get a copy of this message
Constantin Wolber wrote:
SELECT table1.col1,
    table1.col2,
    table2.col1,
    table3.col1,
    table3.col2
FROM (table1 LEFT OUTER JOIN table2
    ON table1.fkcol=table2.idcol)
LEFT OUTER JOIN table3
    ON table1.fkcol2=table3.idcol
WHERE table2.idcol=id ORDER BY table2.col1,table1.col2 The result isn't sorted anymore, I just don't know why this can happen.
Ok seems like te solution ist to change the where clause from table2.idcol to table1.fkcol. Don't really know what the difference is, but it works for me.

« previous php.db (#41597) next »