|
Posted by Boris Stumm on 10/09/07 10:16
Alec wrote:
[...]
> $resultfirst = @mysql_query ("SELECT company, address1, address2 FROM
> table1 WHERE category=active ")
>
> $resultsecond = @mysql_query ("SELECT company, address1, address2
> FROM
> table1 WHERE category=inactive ")
>
> How can I now join these together in one list, with the results from
> the first query being listed before the second, ie keeping the same
> order.
In SQL, you do that again by only using ONE statement.
SELECT company, address1, address2
FROM table1
WHERE category in ('active', 'inactive')
ORDER BY category ASC;
Navigation:
[Reply to this message]
|