title: how create a sql insert query from php select query
body: <p>My problem:</p>
  
  <p>I am trying to delete some important rows from multiple tables, around 20 tables, I am afraid that deleting the rows might cause some problem(I am not the creator of this website), so before deleting the rows I am selecting the rows and writing it into a file. But I write it as an array.</p>
  
  <p>Is there a way to write it as an sql insert statement, to a file, so that it would be easy for me to update the database if there is some problem.</p>