hello friends i want to add my table fields but i got a problem that when ever i add my field for example i enter two records one of ID 2313 having exam_Fee and transport_Fee and other having id of 2314 having same exam_fee and transport_fee.query for this which i gave is
$result = mysql_query ("SELECT SUM(exam_Fee+transport_Fee) FROM fee_info") or die (mysql_error());
while($row = mysql_fetch_array($result))
{
$security=$row['SUM(exam_Fee+transport_Fee)'];
echo "$security";
}
Where "fee_info" is my table name.
what this code does it sum up exam_fee and transport_fee of both the ID's 2313 and 2314 which i don't want.i want to display only sum of exam_fee and transport_fee of only one id at time that when i give the id in search bar e.g 2313 it sum up the record of only it and in same manner when i gave the id 2314 it give me only the sum up of the id 2314 not others.
Thanks in Advance