title: Notice: Object of class mysqli_result could not be converted to int
body: <p>I've searched all the questions that are almost identical to my case. but I am still confused .I just learned php programming and got an problem like this:
  <strong>Notice: Object of class mysqli_result could not be converted to int in</strong> ...
  please help me to solve the above problem.</p>
  
  <pre><code>    &lt;?php
   $per_hal=10;
  $jumlah_record="SELECT COUNT(*) from user";
  $d=mysqli_query($link, $jumlah_record);
  if($d == FALSE) { die(mysql_error()); } 
  $halaman=ceil($d / $per_hal);  //error here
  $page = (isset($_GET['page'])) ? (int)$_GET['page'] : 1;
  $start = ($page - 1) * $per_hal;
  ?&gt;
  </code></pre>