getting a comma separated list in a MySQL Group By statement

If you are combining several rows in a MySQL query using a GROUP BY statement and still want to get a comma separated list of all the values of a particular column…

something like below:


ID           Marks

1                 20

2                 30

3                 40


Result Required:

IDs         Sum(Marks)

1,2,3          90

you should be using the GROUP_CONCAT function of MySQL. Check out more of it at MySQL official documentation


Internet Explorer 6 died

Internet Explorer Six, resident of the interwebs for over 8 years, died the morning of March 1, 2010 in Mountain View, California, as a result of a workplace injury sustained at the headquarters of Google, Inc. Internet Explorer Six, known to friends and family as “IE6,” is survived by son Internet Explorer Seven, and grand-daughter Internet Explorer Eight. Funeral services for Internet Explorer Six will be held at 7pm on March 4 at Aten Design Group, 1629 Downing Street, Denver, CO 80218.

Taken from Check out for full details.  :)

reCaptcha VS noCaptcha

My web developer friends must be knowing what captcha is so they can carry on to the next paragraph however for the not so familiar audiences the captcha is¬† that extra field you encounter when filling a form on the web where some characters are embedded in the picture and you have to enter the characters in the textbox….It is basically used to identify humans… oh not that we have aliens living among us.. but we do have automated scripts and robots on the web specifically created to spread spam and create unwanted links or even sometimes trying to hack the websites or systems.

While using Cpatcha 1 question a developer always faces is whether to use it or not ? Mostly it is counted as an overhead….Coz on one hand we talk about user friendliness and on the other we are telling the user to prove that he is not a robot by filling a field that is not even remotely connected to the user or even the form itself.

From my own experience….before using Captcha I used to get 50 comments daily on that were spam and had all the words ranging from what lingerie does Paris Hilton wears to really asking me If I wanted hot babes right next to my neighborhood….. apart from that also count in the comments that start as “Hey.. your blog is really Cool… Check out I hope you will gain more insight”

…. Seeing that my website has relatively less traffic these 50 comments daily were enough to make me crib and at the end of the week I would select all the comments and BAAMM!! them into the trash… so that’s where Captcha proves helpful and that is where reCaptcha actually comes in. I have used reCaptcha in many of client’s websites and I am a fan of their usefulness and accuracy.

Besides stopping scam, reCaptcha also helps in digitizing textual documents… so the words that you actually put in are at least used somewhere and are not just for checking your authenticity. And there is a lot of old documents yet to be digitized and this could be an easy way to have them converted into modern formats useful for preserving them. Have a look at this for example… you can see the end document produced by reCaptcha Transcription.

So help the world digitize the books… do leave your comments below so you can claim a partnership in helping this cause (:

PS : The term CAPTCHA (for Completely Automated Turing Test To Tell Computers and Humans Apart) was coined in 2000 by Luis von Ahn, Manuel Blum, Nicholas Hopper and John Langford of Carnegie Mellon University. At the time, they developed the first CAPTCHA to be used by Yahoo. — taken from

The bigger the Better ??

I want it big. From an extraordinarily big house ( surrounded with big walls of loneliness on which I can bang my head when I actually realize it), to a real-big bank account (the cash in which would be used to treat my loneliness ofcourse), to an awesome swanky big new Merc (so that when I am drunk I can drive over those nuts and bolts who after the day has screwed them get nothing but a footpath to sleep). I am sure you would be interested in watching my big plasma tv ( the idiot box, with which it seems that we have switched places, idiot) or how about a big office (ofcourse the slums there were removed and nuts now sleep on footpaths) ??

Now don’t get me selfish I can do anything for my nation or for my religion too ( yes obviously I can get into a big Hotel with big firearms and kill the hell lot of little pests. Humans..? who said they are humans, there are obviously aliens living in other nations whom we have to eradicate.)

So the bigger the better??

I would rather name it ‘The Biggest Looser’. I never a gave a second thought to having a big heart (which would help me avoid the dreaded loneliness) or to work big for others (so that they remember me even when I am gone and talk about me when they get together for lunch or to play Partypoker). Obviously instead of firearms, I could have used friendship and love as weapons to scare away the anger. The nations could have united not by power but by peace. Or did I pay attention to have my big ego go on a diet , so that I could have understood what was happening to the slums when I was building MY office or for that matter, what was happening to the slums when I was building my big hotel which was to be blown away anyways by some people just like me ??