RE: [PHP] Need desperate help with query

2007-01-31 Thread Tim


 -Message d'origine-
 De : Skip Evans [mailto:[EMAIL PROTECTED]
 Envoyé : mercredi 31 janvier 2007 17:26
 À : PHP-General
 Objet : [PHP] Need desperate help with query
 
 Okay, so SQL questions shouldn't come to the list,

You are aware of that too eh? 
So why mail here?

 but I am in dire need of some assistance that uses
 a LEFT JOIN and must also get a count of records
 in the RIGHT table, plus group by that count and
 order by it.

Not all PHP developpers use MySQL, am sure you would get a much better
answer on a MySQL list?

 If anyone can help out with this and would be
 willing to email me off list to take a look at it
 the good karma and appreciation would rain down
 upon you in such multitudes as to... as to...
 as... to...

Don't think most here do it for the praise... I've run out of hyperbole.

 
 Help!
Indeed :P
Regards,

Tim
 --
 Skip Evans
 Big Sky Penguin, LLC
 61 W Broadway
 Butte, Montana 59701
 406-782-2240
 http://bigskypenguin.com
 =-=-=-=-=-=-=-=-=-=
 Check out PHPenguin, a lightweight and
 versatile PHP/MySQL development framework.
 http://phpenguin.bigskypenguin.com/
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Need desperate help with query

2007-01-31 Thread Peter Lauri
SELECT COUNT(*) AS thecount FROM table1 LEFT JOIN tabel2 ON (table1.col1 =
table2.col2) GROUP BY table1.col3 ORDER BY thecount;

It might give you some hints...

Best regards,
Peter Lauri

www.dwsasia.com - company web site
www.lauri.se - personal web site
www.carbonfree.org.uk - become Carbon Free


-Original Message-
From: Skip Evans [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 31, 2007 6:26 PM
To: PHP-General
Subject: [PHP] Need desperate help with query

Okay, so SQL questions shouldn't come to the list, 
but I am in dire need of some assistance that uses 
a LEFT JOIN and must also get a count of records 
in the RIGHT table, plus group by that count and 
order by it.

If anyone can help out with this and would be 
willing to email me off list to take a look at it 
the good karma and appreciation would rain down 
upon you in such multitudes as to... as to... 
as... to...

I've run out of hyperbole.

Help!
-- 
Skip Evans
Big Sky Penguin, LLC
61 W Broadway
Butte, Montana 59701
406-782-2240
http://bigskypenguin.com
=-=-=-=-=-=-=-=-=-=
Check out PHPenguin, a lightweight and
versatile PHP/MySQL development framework.
http://phpenguin.bigskypenguin.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php