title: OR operator in SQL statment not giving proper results
body: <p>I have an HTML search box which have an SQL query which should display data if the word matches any of 4 columns in table.</p>
  
  <pre><code>&lt;?php
  $link = mysqli_connect("localhost", "root", "", "sample");
  
  if($link === false){
      die("ERROR: Could not connect. " . mysqli_connect_error());
  }
  
  if(isset($_REQUEST["search"])){
      $sql = "SELECT * FROM image_gallery WHERE key1 OR key2 OR key3 OR key4 LIKE ?";
  
      if($stmt = mysqli_prepare($link, $sql)){
          mysqli_stmt_bind_param($stmt, "s", $param_term);
  
          $param_term = $_REQUEST["search"] . '%';
  
  
          if(mysqli_stmt_execute($stmt)){
              $result = mysqli_stmt_get_result($stmt);
  
              if(mysqli_num_rows($result) &gt; 0){
                  while($row = mysqli_fetch_array($result, MYSQLI_ASSOC)){?&gt;
  </code></pre>
  
  <p>SQL column</p>
  
  <p><a href="https://i.stack.imgur.com/pF1QX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pF1QX.png" alt="enter image description here"></a></p>
  
  <p>This is the complete SQL code, its displaying data sometimes only when word matches last column, doesn't display for first 3 columns when I type corresponding word.</p>