dear Friend my query working but wrong updating feildes query is
$custno=2100;
$date1 = "2004/08/23";
$date2 = "2004/08/29";
$handle = @fopen("http://localhost/unitscustomerspecie.php?cust=".$custno, "rb");
$contents = "";
//print $handle;
if($handle)
{
do {
$data = fread($handle, 8192);
if (strlen($data) == 0) {
break;
}
$contents .= $data;
// print $contents;
} while (true);
fclose($handle);
$contents=trim($contents,"@@");
//print "" .$contents. "CONTENTS OF SLPROJ";
$temp=explode("@@",$contents);
//print count($temp). "count test";
//print "<b>temp: </b>".$temp[0]."<p>";
for($zzz=0;$zzz < count($temp); $zzz++)
{
$temp3=explode("",$temp[$zzz]);
$units[]=$temp3[0];
$Customer[]=$temp3[1];
$speciecode[]=$temp3[2];
print "<p><b>UNITS</b>".$units[$zzz]."><p>";
print "<b>CUSTOMER</b>".$Customer[$zzz]."<p>";
print "<b>SPECIECODE</b>".$speciecode[$zzz]."<p>";
print "UPDATE tblReport Set BudgetUnits=".$units[$zzz]." WHERE specieCode=".$speciecode[$zzz];
// $res_units=mysql_query("UPDATE tblReport Set BudgetUnits = ".$units[$zzz]." WHERE specieCode = ".$speciecode[$zzz]."");
$res_units = "UPDATE tblReport Set BudgetUnits=".$units[$zzz]." WHERE specieCode=".$speciecode[$zzz];
$result5=mysql_query($res_units)or die("could not Update Records");
// $res_units=mysql_query("UPDATE tblReport Set BudgetUnits = 200 WHERE specieCode = 32");
//$res_units="UPDATE tblReport Set BudgetUnits = ".$units[$zzz]." where specieCode = ".$speciecode[$zzz];
}
}
?>
when i execute this page i see these massage
UNITS45>
CUSTOMER2100
SPECIECODE273
UPDATE tblReport Set BudgetUnits=45 WHERE specieCode=273
UNITS197>
CUSTOMER2100
SPECIECODE35
UPDATE tblReport Set BudgetUnits=197 WHERE specieCode=35
UNITS65>
CUSTOMER2100
SPECIECODE38
UPDATE tblReport Set BudgetUnits=65 WHERE specieCode=38
UNITS80>
CUSTOMER2100
SPECIECODE50
UPDATE tblReport Set BudgetUnits=80 WHERE specieCode=50
UNITS69>
CUSTOMER2100
SPECIECODE321
UPDATE tblReport Set BudgetUnits=69 WHERE specieCode=321
but when i see the result from database directly its no ok it update BudgetUnits but put the value in starting feilds not seeking the specieCode ..... so its totaly wrong result to mee please guid me