title: Delete multiple table by given a specific id in php
body: <p>Good day. I'm new to php and now wanted to learn on how to delete 3 tables from android to php by given a specific ID.</p>
  
  <p>Table Info (id, name)
  Table Good (id, sun, tf)
  Table Bad (id, moon, ts)</p>
  
  <pre><code>    &lt;?php 
       //Getting Id
       $id = $_GET['id'];
  
       //Importing database
       require_once('dbConnect.php');
  
       //Creating sql query
       $sql = "DELETE FROM info WHERE id=$id;";
       $sql ="DELETE FROM Good WHERE tf=$id;";
       $sql ="DELETE FROM Bad WHERE ts=$id;";
  
       //Deleting record in database 
       if(mysqli_query($con,$sql)){
       echo 'Employee Deleted Successfully';
       }else{
       echo 'Could Not Delete Employee Try Again';
       }
  
       //closing connection 
       mysqli_close($con);
  ?&gt;
  </code></pre>
  
  <p><strong>Error</strong></p>
  
  <p><a href="https://i.stack.imgur.com/q97cU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q97cU.png" alt="enter image description here"></a></p>
  
  <p>Latest code</p>
  
  <pre><code>&lt;?php 
   //Getting Id
   $mysqli-&gt;multi_query(" Many SQL queries ; ");
   $id = (int)$_GET['id'];
  
   //Importing database
   require_once('dbConnect.php');
  
   //Creating sql query
   $sql  = "DELETE FROM informaation WHERE id=$id;";
   $sql .= "DELETE FROM work_force WHERE twf=$id;";
   $sql .= "DELETE FROM work_details WHERE ts_id=$id;";
  
   //Deleting record in database 
   if(multi_query($con,$sql)){
   echo ' Deleted Successfully';
   }else{
   echo 'Could Not Delete . Try Again.' . mysqli_error($con);
   }
   ?&gt;
  </code></pre>