RE: [PHP-DB] Breaking down a table field....

2003-08-14 Thread Duane Lakoduk
I think you may already have this, but just another 20 pesos

SELECT Unit, COUNT(Unit) [Quantity]
FROM table
GROUP BY Unit


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 8:52 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Breaking down a table field


Next question
How can I show how many of each there were?
SO now I have 

breafast
lunch
dinner

I want to have

breafast2
lunch   3
dinner  3

etc...
is that just as easy?







[EMAIL PROTECTED]
07/08/2003 14:42

 
To: [EMAIL PROTECTED]
cc: [EMAIL PROTECTED]
Subject:Re: [PHP-DB] Breaking down a table field



SELECT DISTINCT(Unit) from TABLE_NAME;




  
  [EMAIL PROTECTED]
  sungard.com To: [EMAIL PROTECTED] 
 
  cc: 
  08/07/2003 09:37 AM Subject:  [PHP-DB] 
Breaking down a table field 
  
  




I have a table, wth many entries.
Each entry has been asigned a unit to belong to.

I want to list all the units dynamically.
How can I display all the units, without displaying each instance of the
unit?

EG:

Unititem
breakfast   cereal
breakfast   toast
lunch   salad
lunch   sandwich
dinner  steak
dinner  pie
lunch   soup
dinner  lasagne

and so on..
I'd wanna get a list of:
breafast
lunch
dinner

not several instances of each...
how can I do this?

*
The information contained in this e-mail message is intended only for
the personal and confidential use of the recipient(s) named above.
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is
strictly prohibited. If you have received this communication in error,
please notify us immediately by e-mail, and delete the original message.
***







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





*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



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



Re: [PHP-DB] Breaking down a table field....

2003-08-14 Thread jeffrey_n_Dyke

SELECT DISTINCT(Unit) from TABLE_NAME;




   

  [EMAIL PROTECTED]
 
  sungard.com To:   [EMAIL PROTECTED]  
 
  cc:  

  08/07/2003 09:37 AM Subject:  [PHP-DB] Breaking down a 
table field   
   

   





I have a table, wth many entries.
Each entry has been asigned a unit to belong to.

I want to list all the units dynamically.
How can I display all the units, without displaying each instance of the
unit?

EG:

Unititem
breakfast   cereal
breakfast   toast
lunch   salad
lunch   sandwich
dinner  steak
dinner  pie
lunch   soup
dinner  lasagne

and so on..
I'd wanna get a list of:
breafast
lunch
dinner

not several instances of each...
how can I do this?

*
The information contained in this e-mail message is intended only for
the personal and confidential use of the recipient(s) named above.
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is
strictly prohibited. If you have received this communication in error,
please notify us immediately by e-mail, and delete the original message.
***







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



RE: Re: [PHP-DB] Breaking down a table field....

2003-08-14 Thread usban
SELECT Unit,COUNT(Unit) as quantity FROM TABLE GROUP BY Unit

-- Oscar Satorre PĂ©rez   [EMAIL PROTECTED] -- 

- Mensaje Original - 
Remitente: [EMAIL PROTECTED] 
Destinatario: [EMAIL PROTECTED] 
Fecha: Jueves, Agosto 7, 2003 3:52pm 
Asunto: Re: [PHP-DB] Breaking down a table field 

Next question 
How can I show how many of each there were? 
SO now I have  
 
breafast 
lunch 
dinner 
 
I want to have 
 
breafast2 
lunch   3 
dinner  3 
 
etc... 
is that just as easy? 
 
 
 
 
 
 
 
[EMAIL PROTECTED] 
07/08/2003 14:42 
 
 
   To: [EMAIL PROTECTED] 
   cc: [EMAIL PROTECTED] 
   Subject:Re: [PHP-DB] Breaking down a table field 
 
 
 
SELECT DISTINCT(Unit) from TABLE_NAME; 
 
 
 
 
  
 [EMAIL PROTECTED] 
 sungard.com To: php- 
[EMAIL PROTECTED]  
 
 cc:  
 08/07/2003 09:37 AM Subject:  [PHP-DB]  
Breaking down a table field  
  
  
 
 
 
 
I have a table, wth many entries. 
Each entry has been asigned a unit to belong to. 
 
I want to list all the units dynamically. 
How can I display all the units, without displaying each instance of  
theunit? 
 
EG: 
 
Unititem 
breakfast   cereal 
breakfast   toast 
lunch   salad 
lunch   sandwich 
dinner  steak 
dinner  pie 
lunch   soup 
dinner  lasagne 
 
and so on.. 
I'd wanna get a list of: 
breafast 
lunch 
dinner 
 
not several instances of each... 
how can I do this? 
 
* 
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above. 
If the reader of this message is not the intended recipient or an 
agent 
responsible for delivering it to the intended recipient, you are 
hereby 
notified that you have received this document in error and that any 
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original  
message.***
 
 
 
 
 
 
 
 
--  
PHP Database Mailing List (http://www.php.net/) 
To unsubscribe, visit: http://www.php.net/unsub.php 
 
 
 
 
 
* 
The information contained in this e-mail message is intended only  
for  
the personal and confidential use of the recipient(s) named above.   
If the reader of this message is not the intended recipient or an 
agent 
responsible for delivering it to the intended recipient, you are  
hereby  
notified that you have received this document in error and that any 
review, dissemination, distribution, or copying of this message is  
strictly prohibited. If you have received this communication in  
error,  
please notify us immediately by e-mail, and delete the original  
message.***
 
 
/SPAN


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



Re: [PHP-DB] Breaking down a table field....

2003-08-14 Thread Tristan . Pretty
My word, easy when you know how...!
Cheers mate!!!






[EMAIL PROTECTED]
07/08/2003 14:42

 
To: [EMAIL PROTECTED]
cc: [EMAIL PROTECTED]
Subject:Re: [PHP-DB] Breaking down a table field



SELECT DISTINCT(Unit) from TABLE_NAME;




  
  [EMAIL PROTECTED]
  sungard.com To: [EMAIL PROTECTED] 
 
  cc: 
  08/07/2003 09:37 AM Subject:  [PHP-DB] 
Breaking down a table field 
  
  




I have a table, wth many entries.
Each entry has been asigned a unit to belong to.

I want to list all the units dynamically.
How can I display all the units, without displaying each instance of the
unit?

EG:

Unititem
breakfast   cereal
breakfast   toast
lunch   salad
lunch   sandwich
dinner  steak
dinner  pie
lunch   soup
dinner  lasagne

and so on..
I'd wanna get a list of:
breafast
lunch
dinner

not several instances of each...
how can I do this?

*
The information contained in this e-mail message is intended only for
the personal and confidential use of the recipient(s) named above.
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is
strictly prohibited. If you have received this communication in error,
please notify us immediately by e-mail, and delete the original message.
***







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





*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



Re: [PHP-DB] Breaking down a table field....

2003-08-14 Thread Ignatius Reilly
SELECT DISTINCT unit...

Ignatius
_
- Original Message - 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 3:37 PM
Subject: [PHP-DB] Breaking down a table field


 I have a table, wth many entries.
 Each entry has been asigned a unit to belong to.
 
 I want to list all the units dynamically.
 How can I display all the units, without displaying each instance of the 
 unit?
 
 EG:
 
 Unititem
 breakfast   cereal
 breakfast   toast
 lunch   salad
 lunch   sandwich
 dinner  steak
 dinner  pie
 lunch   soup
 dinner  lasagne
 
 and so on..
 I'd wanna get a list of:
 breafast
 lunch
 dinner
 
 not several instances of each...
 how can I do this?
 
 *
 The information contained in this e-mail message is intended only for 
 the personal and confidential use of the recipient(s) named above.  
 If the reader of this message is not the intended recipient or an agent
 responsible for delivering it to the intended recipient, you are hereby 
 notified that you have received this document in error and that any
 review, dissemination, distribution, or copying of this message is 
 strictly prohibited. If you have received this communication in error, 
 please notify us immediately by e-mail, and delete the original message.
 ***
 
 


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



Re: [PHP-DB] Breaking down a table field....

2003-08-07 Thread jeffrey_n_Dyke

yep, sure is.
SELECT DISTINCT(Unit), Count(Unit) from TABLE  GROUP BY Unit

hth
jd


   

  [EMAIL PROTECTED]
 
  sungard.com To:   [EMAIL PROTECTED]  
 
  cc:   [EMAIL PROTECTED]  
 
  08/07/2003 09:52 AM Subject:  Re: [PHP-DB] Breaking down 
a table field   
   

   





Next question
How can I show how many of each there were?
SO now I have

breafast
lunch
dinner

I want to have

breafast2
lunch   3
dinner  3

etc...
is that just as easy?







[EMAIL PROTECTED]
07/08/2003 14:42


To: [EMAIL PROTECTED]
cc: [EMAIL PROTECTED]
Subject:Re: [PHP-DB] Breaking down a table field



SELECT DISTINCT(Unit) from TABLE_NAME;





  [EMAIL PROTECTED]
  sungard.com To: [EMAIL PROTECTED]

  cc:
  08/07/2003 09:37 AM Subject:  [PHP-DB]
Breaking down a table field






I have a table, wth many entries.
Each entry has been asigned a unit to belong to.

I want to list all the units dynamically.
How can I display all the units, without displaying each instance of the
unit?

EG:

Unititem
breakfast   cereal
breakfast   toast
lunch   salad
lunch   sandwich
dinner  steak
dinner  pie
lunch   soup
dinner  lasagne

and so on..
I'd wanna get a list of:
breafast
lunch
dinner

not several instances of each...
how can I do this?

*
The information contained in this e-mail message is intended only for
the personal and confidential use of the recipient(s) named above.
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is
strictly prohibited. If you have received this communication in error,
please notify us immediately by e-mail, and delete the original message.
***







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





*
The information contained in this e-mail message is intended only for
the personal and confidential use of the recipient(s) named above.
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is
strictly prohibited. If you have received this communication in error,
please notify us immediately by e-mail, and delete the original message.
***







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