title: Echo Multiple PHP MySQL calls doesn't show in HTML
body: <p>I'm trying to echo a count result from my MySQL db in PHP, so it looks like</p>
  <h3>NUMBER OF STUDENTS</h3>
  <h3>[# count from db]</h3>
  <p>but nothing is coming up on my HTML page. I ran this store procedure in my db and I'm getting 923 so I know it's not supposed to be empty. However, when I run this on the HTML page, it falls into the &quot;Nothing exists&quot; case. I printed to the console and for some reason, it returns empty.</p>
  <p>I feel like this might be with this particular php section, because I have another SQL query I run somewhere else in the code and it works just fine. I'm not sure why it's returning nothing:</p>
  <pre><code>&lt;body&gt;
  //////// THIS CALL WORKS FINE AND DISPLAYS RESULTS ////////
  &lt;h5&gt;Here is a sample of the first 10 students pulled from the database:&lt;/h5&gt;
              &lt;center&gt;&lt;?php
              $sql=&quot;call DisplayRandomTable('db', 'table', 10)&quot;;
              $result = mysqli_query($conn, $sql);
              $resultCheck = mysqli_num_rows($result);
  
              if ($resultCheck &gt; 0) {
                  echo &quot;&lt;table border = '2'&gt;
                      &lt;tr&gt;
                          &lt;th&gt;&lt;center&gt;Student ID&lt;/center&gt;&lt;/th&gt;
                          &lt;th&gt;&lt;center&gt;Student Name&lt;/center&gt;&lt;/th&gt;
                          &lt;th&gt;&lt;center&gt;Student Start Date&lt;/center&gt;&lt;/th&gt;
                      &lt;/tr&gt;&quot;;
                  while ($row = mysqli_fetch_assoc($result)) {
                      echo &quot;&lt;tr&gt;&quot;;
                      echo &quot;&lt;td&gt;&lt;center&gt;&quot; . $row['STUDENT_ID'] .&quot;&lt;/center&gt;&lt;/td&gt;&quot;;
                      echo &quot;&lt;td&gt;&lt;center&gt;&quot; . $row['Last_Name'] . &quot;&lt;/center&gt;&lt;/td&gt;&quot;;
                      echo &quot;&lt;td&gt;&lt;center&gt;&quot; . $row['Start_Date'] . &quot;&lt;/center&gt;&lt;/td&gt;&quot;;
                      echo &quot;&lt;/tr&gt;&quot;;
                  }
                  echo &quot;&lt;/table&gt;&quot;;
              }
              ?&gt;&lt;/center&gt;
  ////////////////////////////
  .
  .
  .
  .
  //////// THIS CALL IS WHERE THE ISSUE IS ////////
      &lt;div id=&quot;tabs-2&quot; class=&quot;tabContent&quot;&gt;
          &lt;h3&gt;&lt;center&gt;STUDENT DEMOGRAPHY&lt;/center&gt;&lt;/h3&gt;
              &lt;div class=&quot;flex-container&quot;&gt;
                  &lt;div class=&quot;flex-item&quot;&gt;
                      &lt;h4&gt;&lt;center&gt;NUMBER OF STUDENTS&lt;/center&gt;&lt;/h4&gt;
                          &lt;?php
                              // Check connection
                              if ($conn-&gt;connect_error) {
                                  die(&quot;Connection failed: &quot; . $conn-&gt;connect_error);
                              }
  
                              $sql = &quot;call GetTableCount('Students_Information', 'Students')&quot;;
                              $result = $conn-&gt;query($sql);
                              echo(&quot;&lt;script&gt;console.log('The results: &quot; . $result . &quot;');&lt;/script&gt;&quot;);
                              if ($result-&gt;num_rows &gt; 0) {
                                  $row = $result-&gt;fetch_row();
                                  echo 'Total:'. $row[0]; // print total record
                              } 
                              else 
                              {
                                  echo 'Nothing exists';
                              }
                          ?&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
          &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>