我正在检查表的行的值,并尝试将此表的另一个值导入另一个表

What I am trying to do is check with fetch_assoc() some column of rows of table Warning. Then if those checks are correct I would like to insert into another table DataTable values of some columns of the rows of Warning. This is my code:

$conn= mysqli_connect("localhost","root","root");        

$query = "SELECT Addr, Pol  FROM Warning";


if ($result = mysqli_query($conn, $query)) {

while($row=mysqli_fetch_row($result)) {

    if(($row['Addr']>=5) && ($row['Pol']<=15)) 
   {
    $sql=  " INSERT INTO DataTable(Info,Valuesop,Dataop) SELECT (Number,Valuessom,Transf) FROM Warning ";
    $conn->query($sql);
    echo "yes";
  }

  else
  {


   echo "no";


  }
}
}