[PHP] group queries result

2004-09-13 Thread Barbara Picci
Hi all,
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.
How can I do that?
Can anyone help me?
Thanks in advance
Barbara
--
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] group queries result

2004-09-13 Thread Barbara Picci
Hi all,
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.
How can I do that?
Can anyone help me?
Thanks in advance
Barbara
--
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] group queries result

2004-09-13 Thread Barbara Picci
Hi all,
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.
How can I do that?
Can anyone help me?
Thanks in advance
Barbara
--
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] group queries result

2004-09-13 Thread Barbara Picci
Hi all,
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.
How can I do that?
Can anyone help me?
Thanks in advance
Barbara
--
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] group queries result

2004-09-13 Thread Burhan Khalid
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


Re: [PHP] group queries result

2004-09-13 Thread raditha dissanayake
This is off topic and please don't send multiple copies of the same message.
--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php