title: mysqli_query($conn, $sql) or $conn->query($sql)
body: <p>I am new to web Development, I am currently not using any frameworks. </p>
  
  <p>Till now, I was using <code>mysqli_query($conn, $sql)</code> to send a query to the MySQL server.</p>
  
  <p>Recently I read another technique which use <code>$conn - &gt; query($sql)</code>.</p>
  
  <p>I know that <code>$conn-&gt;query($sql)</code> is the OOP way of sending query and <code>mysqli_query($conn, $sql)</code> is the procedural method.</p>
  
  <p>I haven't learned Object Oriented PHP yet However, I am going to learn it soon before moving onto a framework.</p>
  
  <p>Could someone tell me the advantages of using <code>$conn-&gt;query($sql)</code> over the <code>mysqli_query($conn, $sql)</code>? 
  Is it more secure? Is there something else to it?</p>
  
  <p>I know OOP is better than Procedural, but I'd like to know the main advantages, from the point of Security(mainly)!</p>