Re: Contributor Database
Posted by: George John
Date: July 21, 2006 04:52AM

The Code you have given to me it's work fine on mysql Command Line,THANKS


And I Have put That Code in PHP this way and I get Error Msg(see down the error):

<?php
include 'config.php';
include 'connect.php';

$query = "SELECT c.Donor_name, sum(p.amount_pledged)
FROM contributors AS c LEFT JOIN pledges AS p ON c.contributor_id = p.contributor_id GROUP BY c.Donor_name";

$result = mysql_query($query);

while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
echo "Donor_Name :{$row['Donor_Name']} <br>" .
"Amount_pledged : {$row['Amount_Pledged']} <br>";
}

include 'closedb.php';
?>

I GOT THE FOLLOWING ERROR

Notice: Undefined index: Donor_Name in c:\Inetpub\wwwroot\amount.php on line 12

Notice: Undefined index: amount_pledged in c:\Inetpub\wwwroot\amount.php on line 13
Donor Name :
Amount_pledged :

Options: ReplyQuote


Subject
Written By
Posted
July 19, 2006 08:59AM
July 19, 2006 09:22AM
July 19, 2006 11:31PM
Re: Contributor Database
July 21, 2006 04:52AM
July 21, 2006 08:30AM
July 21, 2006 11:17AM
July 21, 2006 11:54AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.