RE: Need desperate help with query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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:skip@xxxxxxxxxxxxxxxxx] 
Sent: Wednesday, January 31, 2007 6:26 PM
To: PHP-General
Subject:  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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux