Hi
First post here.
I've been learning myself php and sql and haven't really had any problems until latley. I'm working on a large comminity driven site from scratch.
I'm wondering if it's possible to order the results of a query by a subquery? I tried this:
"SELECT * FROM forum_posts WHERE is_topic = 1 AND category = " . $_REQUEST['id'] . " ORDER BY (SELECT time FROM forum_posts WHERE id = last_reply) ASC";
Where last_reply would be on of the fields returned by the initial query. Although it doesn't crash or anything it does not do what I'm after. It return the same as if I had no ORDER BY at all.