title: check tuple data before inserting sql query - php
body: <p>I am trying to check the database tables for data before entering new data and avoiding the dublicates.</p>
  
  <pre><code>  $sqlQuery = "INSERT INTO " . $table . " ( " . $columns . ") VALUES( '" . $columnData . "') 
                          SELECT " . $columnData .  " FROM " . $columns . " 
                          WHERE NOT EXISTS (SELECT '" .$columnData . "' 
                          FROM " . $table . " WHERE '" . $columnData . "' = '" . $columnData . "')";
  </code></pre>
  
  <p>The query does not throw any errors, although the query is not executed as expected.</p>
  
  <p>Thanks in advance</p>