while($row=mysql_fetch_array($result2)){    
        //return $row['ProjectID'];
        $sql="INSERT INTO `tycodashboard` (ProjectID,DesignationID,ReqcompID,IntOrgID,FinishedTimeID,ProjectStatusID,PhaseID
                ) VALUES('{$row['ProjectID']}','$pm,'$req','$initiating,'$initiating','$ftime,'$ProjectStatus,'$Phase)";
        $result=mysql_query($sql);
        if(!$result){
            if(mysql_errno() == ER_DUP_ENTRY){
                throw new Exception("INSERT FAILED.\n\nThe database already contains a Project with the Project Name \"$ldesc\", please pick another.");
            }else{
                throw new Exception("INSERT FAILED.\n\n".mysql_error());
            }
        }
        }//exits
    INSER开发者_C百科T FAILED.
    You have an error in your SQL syntax; check the manual that 
corresponds to your MySQL server version for the 
right syntax to use near '3','2,'2','2,'2,'3)' at line 2
You are missing a whole bunch of quotes as you can see from the error message:
'3','2,'2','2,'2,'3
Try adding the quotes where they are missing and see if that helps:
$sql="INSERT INTO `tycodashboard` (ProjectID,DesignationID,ReqcompID,IntOrgID,FinishedTimeID,ProjectStatusID,PhaseID
      ) VALUES ('{$row['ProjectID']}','$pm','$req','$initiating','$initiating','$ftime','$ProjectStatus','$Phase')";
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论