How to debug a MySQL error in PHP? -


i have code don't have problem somehow mysql query part (marked arrow ------>) stopping code.

the mysql command fine , mysql_connection working, can ping it.

i'm working time that, can't find error, , since code stopping can't fetch error message.

<?php //including mysql_connection include("../mechanics/mysql_con.php");  ?> <html> <head>  <link rel="stylesheet" type="text/css" href="../mechanics/segments_container.css"/>  </head> <body>  <div class = "container">     <div class = "titlebar">          members      </div>     <div class = "inner_container">          <center>             <table style="color:#cccccd;width:100%;">                 <tr>                     <td style="min-width:50px;text-align:center;"><b>avatar</b></td>                     <td style="min-width:150px;text-align:center;"><b>username</b></td>                     <td style="min-width:50px;text-align:center;"><b>joined</b></td>                     <td style="min-width:50px;text-align:center;"><b>posts</b></td>                     <td style="min-width:50px;text-align:center;"><b>reputation</b></td>                 </tr>                  <?php                      $mysql_get_users = "select avatar, name, registerdate, posts, reputation members";      ----->          $data = $mysqli->query($mysql_get_users);      ----->          while($row = $data->fetch_array()){                          ?>                              <tr>                                 <td><?php echo $row["avatar"]; ?></td>                                 <td><?php echo $row["name"]; ?></td>                                 <td><?php echo $row["registerdate"]; ?></td>                                 <td><?php echo $row["posts"]; ?></td>                                 <td><?php echo $row["reputation"]; ?></td>                             </tr>                          <?php                     }                   ?>              </table>         </center>      </div> </div>  </body> </html> 

i think found answer. because file memberlist.php include index.php, directory wasn't ../mechanics/mysql_con.php instead mechanics/mysql_con.php

i guess because of including path started index , not it's folder segments (where memberlist.php in)

thanks every second. :)


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -