Mysql and PHP leaderboard acting strange -


i trying make leaderboard , sort data kills, when try make grabs name, kill, death doesnt grab when have grab works. know why? code below please assist.

<?php                     $query = $koneksi->prepare("select * `player`");                     $query->execute();                     if($query->rowcount() == 0) 

i grabbing mysql data here, if change * data need no data displayed.

                        echo "<tr><td colspan='6'><small>there's no player on ban list</small></td></tr>";                     }                     while($data = $query->fetch())                     {                         echo "<tr><td>".$data['name']."</td>";                         echo "<td>".$data['kill']."</td>";                         echo "<td>".$data['death']."</td>";                         $kd = $data['kill'] / $data['death'];                         echo "<td>".$kd."</td></tr>";                     }                     ?> 

is or wrong? confused.

here have use bind_result() , in have pass number of parameters equal number of field player table.
because here fetching data using select * query.


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -