For Programmers: Free Programming Magazines  


Home > Archive > PHP SQL > August 2006 > GROUP BY cluse









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author GROUP BY cluse
jatrojoomla

2006-08-28, 7:58 am

I am trying to use GROUP BY cluse, what is the utility of this cluse in
MySQL
plz. any body tell me

IchBin

2006-08-28, 6:58 pm

jatrojoomla wrote:
> I am trying to use GROUP BY cluse, what is the utility of this cluse in
> MySQL
> plz. any body tell me
>


Not sure, by your question, if you are asking how to use GROUP BY
clause. If you are then look here:

http://dev.mysql.com/doc/refman/5.1...-modifiers.html

--
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Duane Phillips

2006-08-28, 6:58 pm

It works basically the same as in other SQL driven databases, excepting that
it uses single quotes for instead of double.

Sample of character, numerical, and table to table link in WHERE clause:

WHERE table1.field1 = 'some parameter' AND table1.field2 = 6 AND
table1.field5 = table3.field1

With character and date fields use single quote marks around the parameter
value, and skip the single quotes for numerical arguments.

This is the basic structure, but you can do far more operators and
nestings... but it is basically SQL 92 compliant (depending on your version
of MySQL, which you did not specify).

Cheers!

~ Duane Phillips.

"jatrojoomla" <jatrojoomla@gmail.com> wrote in message
news:1156770696.026364.285250@74g2000cwt.googlegroups.com...
>I am trying to use GROUP BY cluse, what is the utility of this cluse in
> MySQL
> plz. any body tell me
>



Justin

2006-08-29, 4:03 am

example: SELECT * FROM abc WHERE name='abc' GROUP BY age

jatrojoomla wrote:
> I am trying to use GROUP BY cluse, what is the utility of this cluse in
> MySQL
> plz. any body tell me


Duane Phillips

2006-08-29, 4:03 am

OK. I posted my answer to the wrong message. *sigh*. Not my day.

And Group By has been handled enough by the other posters...

Cheers...

"Duane Phillips" <duane.phillips@askme.askme> wrote in message
news:- audnb5pUZioDW7ZnZ2dnUVZ_rOdnZ2d@giganews
.com...
> It works basically the same as in other SQL driven databases, excepting
> that it uses single quotes for instead of double.
>
> Sample of character, numerical, and table to table link in WHERE clause:
>
> WHERE table1.field1 = 'some parameter' AND table1.field2 = 6 AND
> table1.field5 = table3.field1
>
> With character and date fields use single quote marks around the parameter
> value, and skip the single quotes for numerical arguments.
>
> This is the basic structure, but you can do far more operators and
> nestings... but it is basically SQL 92 compliant (depending on your
> version of MySQL, which you did not specify).
>
> Cheers!
>
> ~ Duane Phillips.
>
> "jatrojoomla" <jatrojoomla@gmail.com> wrote in message
> news:1156770696.026364.285250@74g2000cwt.googlegroups.com...
>
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com