Barbara Picci wrote:
I've to extract data from a mysql db using two different queries and I must have an unique output sorting them alphabetically.
For istance, query1: select * from ads where guest='PK';
count the number of results, make the difference between a given number and the number of results (variable $num).
query2: select from ads where guest='PK' limit $num;
now I have to export all results together sorting them.
Why not do SELECT FROM `ads` WHERE `guest`='PK' ORDER BY `sortfield` ASC LIMIT $num ?
That would get you a sorted list. I don't understand why you are using $num, other than pagination.
You also didn't mention how this is related to PHP, it seems to be a SQL issue.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php