title: SQL query is only displaying the column in 'where clause'
body: <p>I have a website where it shows restaurant information. I am fetching it through database and I am using php.</p>
  <p>When I search for anything it does shows the result in my website. But, for example if there is one <code>div</code> that contains the data of restaurant such as phono no, name, address etc and I searched for the restaurant name, it will only show the restaurant name but hide rest of the information and if it matches (the name) somewhere else let's say in reviews it will show that but again hides the rest. In short only shows that specific words. How can I make it show the full div in my case <code>myDiv</code> so the user can see rest of the information as well. If they search for the name of restaurant it's obvious they would want to see that restaurant information (which is in the div) rather hiding it and only showing the matches only. Sorry for long explanation just making sure it's understandable what I am trying to say. If any more information is needed please leave me a comment.</p>
  <p>My code:</p>
  <pre><code>      echo '&lt;input class=&quot;form-control&quot; id=&quot;searchAnything&quot; type=&quot;text&quot; placeholder=&quot;Search..&quot;&gt;';
  
  while ($result = $getRestaurantData-&gt;fetch(PDO::FETCH_ASSOC)) {
      //restaurant id
      echo &quot;&lt;div class='container' id='myDIV'&gt;&quot;;
  
      //getting basicinfo data by _id
      echo &quot;&lt;div class='row'&gt;&quot;;
      echo &quot;&lt;div class='col-sm'&gt;&quot;;
      getInfo($result['_id']);
      echo &quot;&lt;/div&gt;&quot;;
      //getting highlights data by _id
      echo &quot;&lt;div class='col-sm'&gt;&quot;;
      echo &quot;&lt;nav&gt;&quot;;
      echo &quot; &lt;div class='nav nav-tabs' id='nav-tab' role='tablist'&gt;&quot;;
      echo &quot;&lt;a class='nav-link active' id='nav-highlights-tab' data-toggle='tab' href='#nav-highlights' role='tab' aria-controls='nav-highlights' aria-selected='true'&gt;Highlights&lt;/a&gt;&quot;;
      echo &quot;&lt;a class='nav-link' id='nav-review-tab' data-toggle='tab' href='#nav-reviews' role='tab' aria-controls='nav-reviews' aria-selected='false'&gt;Reviews&lt;/a&gt;&quot;;
      echo &quot;&lt;/div&gt;&quot;;
      echo &quot;&lt;/nav&gt;&quot;;
      echo &quot;&lt;div class='tab-content' id='nav-tabContent'&gt;&quot;;
      echo &quot;&lt;div class='tab-pane fade show active' id='nav-highlights' role='tabpanel' aria-labelledby='nav-highlights-tab'&gt;&quot; .
      getData1($result['_id']) .
  
          &quot;&lt;/div&gt;&quot;;
      echo &quot;&lt;div class='tab-pane fade' id='nav-reviews' role='tabpanel' aria-labelledby='nav-reviews-tab'&gt;&quot; .
      getData2($result['_id']) .
          &quot;&lt;/div&gt;&quot;;
  
      echo &quot;&lt;/div&gt;&quot;;
      echo &quot;&lt;/div&gt;&quot;;
      echo &quot;&lt;/div&gt;&quot;;
      echo &quot;&lt;/div&gt;&quot;;
  
  }
  
  
  echo &quot;&lt;script&gt;
  console.log('yoo');
  
  
  $(document).ready(function () {
      $('#searchAnything').on('keyup', function () {
        var value = $(this).val().toLowerCase();
        $('#myDIV *').filter(function () {
          $(this).toggle($(this).text().toLowerCase().indexOf(value) &gt; -1)
        });
      });
    });
  
  &lt;/script&gt;&quot;;
  </code></pre>
  <p>Updated code (try to change to html before it was php):</p>
  <pre><code> &lt;input class=&quot;form-control&quot; id=&quot;searchAnything&quot; type=&quot;text&quot; placeholder=&quot;Search..&quot;&gt;';
      
          while ($result = $getRestaurantData-&gt;fetch(PDO::FETCH_ASSOC)) {
              //restaurant id
              &lt;div class='container' id='myDIV'&gt;
          
              //getting basicinfo data by _id
             &lt;div class='row'&gt;
              &lt;div class='col-sm'&gt;
              getInfo($result['_id'];
              &lt;/div&gt;
              //getting highlights data by _id
              &lt;div class='col-sm'&gt;
              &lt;nav&gt;
               &lt;div class='nav nav-tabs' id='nav-tab' role='tablist'&gt;
              &lt;a class='nav-link active' id='nav-highlights-tab' data-toggle='tab' href='#nav-highlights' role='tab' aria-controls='nav-highlights' aria-selected='true'&gt;Highlights&lt;/a&gt;&quot;;
              echo &quot;&lt;a class='nav-link' id='nav-review-tab' data-toggle='tab' href='#nav-reviews' role='tab' aria-controls='nav-reviews' aria-selected='false'&gt;Reviews&lt;/a&gt;
              &lt;/div&gt;
              &lt;/nav&gt;
             &lt;div class='tab-content' id='nav-tabContent'&gt;
              &lt;div class='tab-pane fade show active' id='nav-highlights' role='tabpanel' aria-labelledby='nav-highlights-tab'&gt;&quot; .
              getData1($result['_id']) .
          
                  &lt;/div&gt;
              &lt;div class='tab-pane fade' id='nav-reviews' role='tabpanel' aria-labelledby='nav-reviews-tab'&gt;&quot; .
              getData2($result['_id']) .
                  &lt;/div&gt;
               &lt;/div&gt;
              &lt;/div&gt;
              &lt;/div&gt;
              &lt;/div&gt;
          
          }
          
          
          
          &lt;script&gt;
          
          $(document).ready(function () {
              $('#searchAnything').on('keyup', function () {
                var value = $(this).val().toLowerCase();
                $('#myDIV *').filter(function () {
                  $(this).toggle($(this).text().toLowerCase().indexOf(value) &gt; -1)
                });
              });
            });
          
          &lt;/script&gt;
      
      function getRestaurantHighlights($restaurant_id)
      {
      &lt;h2&gt;Resturant name&lt;/h2&gt;
      &lt;p&gt;info&lt;/p&gt;
      &lt;h2&gt;info 2&lt;/h2&gt;
      &lt;p&gt;phone no&lt;/p&gt;
      }
      
      
      function getRestaurantReviews($restaurant_id)
      {
      &lt;h2&gt;Reviews&lt;/h2&gt;
      }
  </code></pre>