Hi
global $conn;
//PO_Imp_F_Head_Normal internal include many records of PO_Imp_F_Item_Normal table
$strSQLExists = "select * from PO_Imp_F_Item_Normal where Internal='".$deleted_values["Internal"]."' ";
$rsExists = db_query($strSQLExists,$conn);
while($data1=db_fetch_array($rsExists))
{
// this while loop i will find out what are the PCNo,SeqNo,Cat_ID,Item_Code related to that internal
$strSQLExists = "select PCNo,SeqNo,Cat_ID,Item_Code from PO_Imp_F_Item_Normal where PCNo='".$data1["PCNo"]."' AND SeqNo='".$data1["SeqNo"]."' AND Cat_ID='".$data1["Cat_ID"]."' AND Item_Code='".$data1["Item_Code"]."' AND Internal !='".$deleted_values["Internal"]."' ";
$rsExists = db_query($strSQLExists,$conn);
$data2=db_fetch_array($rsExists);
// in hear im seaching PO_Imp_F_Item_Normal table exists PCNo,SeqNo,Cat_ID,Item_Code find from above
if($data2 == '0')// if records not exists
{
$em="";
$strSQLUPdate = "UPDATE SC_Item_NotIncluded
SET Item_Code
='".$em."'
WHERE Sc_No='".$data1["PCNo"]."' AND Seq_No='".$data1["SeqNo"]."' AND CatID='".$data1["Cat_ID"]."' AND Type='F' ";
db_exec($strSQLUPdate ,$conn);
above 2 line s i will deleting the item codes
my problem is from hear this will only deleting one record item code ( but there ar more than 1 records)
}
else // if records exists
{
$strSQLUPdate = "UPDATE SC_Item_NotIncluded
SET Item_Code
='".$data1["Item_Code"]."'
WHERE Sc_No='".$data1["PCNo"]."' AND Seq_No='".$data1["SeqNo"]."' AND CatID='".$data1["Cat_ID"]."' AND Type='F' ";
db_exec($strSQLUPdate ,$conn);
}
}
plzzzzzzzz
how do i over come this problem of not deleteing every effected records
plzzzzzzzzzzzzzzzzz help meeeeeeeee