I just can not get the LIMIT to work, I comment it out then the code work find.
Code: Select all
if ($_SESSION['playeraccess'] >= 2) {
$charslots = "$invenlordmax";
}
else {
$charslots = "$invenmax";
}
$query = "select * from `lqlotl.inventory` where `inventory.charid` = `$charid` limit 0,`$charslots` ";
$result = mysql_query($query) or die("Could not find chars invetory ");
$num_rows = mysql_num_rows($result);
$result2 = mysql_fetch_array($result);
if ($result2) {
echo " <center>
<h1>" . $charname . "s Inventory slots </h1><br /><br />
<h2> Used: " . $num_rows . " out off " . $charslots . " <h2>
<table border='2' >
<tr>
<th scope='col' >Slot<font color='#FFFFFF'>____ </font></th>
<th scope='col'>Name<font color='#FFFFFF'>____ </font