Contribution table

Completado Publicado Jun 6, 2007 Pagado a la entrega
Completado Pagado a la entrega

I have a php script accessing a mysql database and generating a report using mysql_fetch_array. After that, I am moving the results around in the script and performing some calculations before generating a report.

Data in the mysql data table essentially consists of a number of contibutions, with the donor, the date and the amount all in separate field for each record. I am trying to get a listing of the contributions by each donor, with the amount for each month listed in a separate column for each month.

The problem I am having is that while my script does this, it generates a separate line for the donor for each month there is a contribution. Thus, if there are three contributions in three separate months, I end up with three lines for that donor.

I would like a fix for this problem. Additionally, I am using just one date for each month such as 2007-01-31, but would like to have the script be able to combine amounts if there were more than one date for a donor in an amount.

Attached is a screen shot of the result I am currently getting, which shows the problem, as well as the script I am currently using. I have a mysql dump which can be sent if needed.

PHP

Nº del proyecto: #150498

Sobre el proyecto

2 propuestas Proyecto remoto Activo Jun 6, 2007

Adjudicado a:

ciprianvb

the problem is that u need to use the DISTINCT MYSQL function coreclty. I can show u how. I ama vailable to talk on yahoo or msn or skype using this id: xxxxxxxxxx thanks, Ciprian

$35 USD en 0 días
(69 comentarios)
5.6

2 freelancers están ofertando un promedio de $33 por este trabajo

deltahex

Interested.

$30 USD en 1 día
(5 comentarios)
3.7