Em Andamento

Contribution table

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.

Habilidades: PHP

Ver mais: contribution table, table, trying get, database calculations, accessing, php data table, table month php, fix listing, report table, table php, mysql combine, result number, screen record php, generates, performing calculations using php, performing, report mysql database, listing fix, mysql data report, combine database, php mysql table, report generating, 2007 script, generating, needed database report

Acerca do Empregador:
( 14 comentários ) Houston, United States

ID do Projeto: #150498

Premiar 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 em 0 dias
(69 Avaliações)
5.6

2 freelancers estão ofertando em média $33 para este trabalho

deltahex

Interested.

$30 USD em 1 dia
(5 Comentários)
3.7