Forum Moderators: open
Cant we do without using where condition, ie what i want
This will get you what you want:
SELECT COUNT(*)
FROM Table1
WHERE Field1 LIKE '%X%'
But I want to perform above queries in one......
I would like to have somewhat
$sql = "SELECT count(field1 = 'A') AS no_of_A, count(field1 = 'B') AS no_of_B, count(field2 = 'X') AS no_of_X),count(field2 = 'Y') AS no_of_Y FROM table_name WHERE field1='Y'"
I know above query doesnt work..i am just telling what i want to do..
and thats the very challenging for me..
Any comments and suggestions are warmly welcome
I am awaiting for your help.
Thanks in advance to all of you