Re: Contributor Database
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 :
Subject
Written By
Posted
Re: Contributor Database
July 21, 2006 04:52AM
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.