|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
I want to get the following result on a webpage :
Date Name type1 type2 type3 1999/11/10 joe 10 2 6 But my in my table they are stored like this : 1999/11/10 joe type1 1999/11/10 joe type2 1999/11/10 joe type1 1999/11/10 joe type3 1999/11/10 joe type1 Can anyone help me with the right query? I know in MS Access you can do this with : count(IIF(type=type1),1,0) Is there a function like this for MySQL? |
|
#2
|
|||
|
|||
|
I found it myself (finally)
The way to go is : Select date,count(IF(type='Normal',1,0)).. . group by date; Thanks! |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > Special Count |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|