I've been trying to work out a complicated query to select and sum multiple columns in one select using a condition and multi column group by


What I expected to get was ONE row with the columns summed .

this query returns 5 rows

SELECT sum(`AllTheWeb`),sum(`AltaVista`),sum(`AOL`),sum(`Ask`),sum(`Ask Jeeves`),sum(`Cest trouve`),sum(`DirectHit`),sum(`DMOZ`),sum(`Dogpile`),sum(`Euroseek`),sum(`Excite`),sum(`Fireball`),sum(`FrancitT`),sum(`Go2Net`),sum(`Google`),sum(`Hotbot`),sum(`Kanoodle`),sum(`LBB`),sum(`Libertysurf`),sum(`Lokace`),sum(`Lycos`),sum(`Mamma`),sum(`MegaSpider`),sum(`MetaCrawler`),sum(`MetaGer`),sum(`MSN`),sum(`NBCI`),sum(`Netscape`),sum(`Nomade`),sum(`NorthernLight`),sum(`Overture`),sum(`Spray`),sum(`Terra`),sum(`Vindex.nl`),sum(`Voila`),sum(`Web.de`),sum(`WebCrawler`),sum(`WebSearch`),sum(`Yahoo`) FROM engine where sitenum = "2365602" GROUP BY `AllTheWeb`,`AltaVista`,`AOL`,`Ask`,`Ask Jeeves`,`Cest trouve`,`DirectHit`,`DMOZ`,`Dogpile`,`Euroseek`,`Excite`,`Fireball`,`FrancitT`,`Go2Net`,`Google`,`Hotbot`,`Kanoodle`,`LBB`,`Libertysurf`,`Lokace`,`Lycos`,`Mamma`,`MegaSpider`,`MetaCrawler`,`MetaGer`,`MSN`,`NBCI`,`Netscape`,`Nomade`,`NorthernLight`,`Overture`,`Spray`,`Terra`,`Vindex.nl`,`Voila`,`Web.de`,`WebCrawler`,`WebSearch`,`Yahoo`


the simplest query select * from engine where sitenum = "2365602" returns 15 rows


Did I find a bug (either on the query side) on the error checking side, where by it's allowing a disallow able query or is that query just SOOOOOO badly formatted that it'll never work but is allowable?



I really need some help :) to execute "THAT" query where by getting one row with those columns summed


Thanks Rick



---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to