PHP IDS??

Status
Not open for further replies.

Berk

berkibap#4233
Developer
Oct 17, 2015
863
190
sup.
Idek why my ID's from plus emulator table shown like this:
BrmgGG.png


Any clues how can I fix this?
Code:
Yes, I'm using mysql and i love it.
Code:
$query = "SELECT * FROM users WHERE `is_vip_shop_staff` = 1";
$result = mysql_query($query);
echo mysql_error();
echo "<table class='table table-hover'> <thead>
      <tr>
        <th>ID</th>
        <th>Username</th>
        <th>In-Game Rank</th>
        <th>Fire user</th>
        
      </tr>
    </thead><tbody>";

while($row = mysql_fetch_array($result)){   //Creates a loop to loop through results
$id = $row['id'];
echo "<tr><td>" . $row['id'] . "</td><td>" . $row['username'] . "</td><td>" . $row['rank'] ."</td> ";
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,637
2,389
How exactly are they meant to be displayed? Can you show us your database structure and the information stored in your database?
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,637
2,389
Hmm, that is strange. I can't see why they're having all those 0's at the start.

Only thing I can suggest is using ltrim.
PHP:
echo "<tr><td>" . ltrim($row['id'], '0') . "</td><td>" . $row['username'] . "</td><td>" . $row['rank'] ."</td> ";
Try to see if that works.
 
Hold up, just noticed you've got something called 'Zerofill' ticked, try to untick it and see what happens. It looks like it's going to fill the remaining characters with 0's. Your length is 11 digits, so if your integer is 1, it will fill 10 zeros before your number... I hope that makes sense.

302392922209499889a11fcda18fb544.png
 
Status
Not open for further replies.

Users who are viewing this thread

Top