How can I get the highest number in my ID column?
With MySQL I have the connection part done I just need to know how I can display that number using PHP. I got some of my code from a friend:
<?php
$con = mysql_connect("quollcraft.net", "quollcr1_forum", "pw");
if (!$con) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db("quollcr1_hub", $con);
$result = mysql_query("SELECT * FROM recentplayers ORDER BY id DESC LIMIT 28");
echo "<table>";
while ($row = mysql_fetch_array($result))
echo "<td>";
echo "<center>";
echo '<img class="avatar" src="http://cravatar.eu/avatar/' . $row ['name'] . '/40.png" rel="tooltip" style="display: inline-block" title="' . $row ['name'] . '">';
echo "</td>";
echo "</table>";
mysql_close($con);
?>
<?php
$con = mysql_connect("quollcraft.net", "quollcr1_forum", "pw");
if (!$con) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db("quollcr1_hub", $con);
$result = mysql_query("SELECT * FROM id ORDER BY id DESC LIMIT 1");
echo "<table>";
while ($row = mysql_fetch_array($result))
echo "<td>";
echo "<center>";
echo "<p>' . $row ['id'] . 'hello</p>";
echo "</td>";
echo "</table>";
mysql_close($con);
?>`
Its supposed to show my latest players then the total players i have.