Jump to content

How to fetch unique names from columns ?


ankur0101

Recommended Posts

Hi,

I have table structure as follows :

 

Name            Amount

=================

John               500

John               300

John               200

Danny            250

Danny            250

=================

 

Now I want to fetch data according to follows :

 

John => 1000

Danny => 500

 

I tried lot of logics but nothing still working perfectly. I am using codeigniter. But if I will get PHP code to fetch like that, I can manage things in codeigniter.

 

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/279998-how-to-fetch-unique-names-from-columns/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.