Hello fellow PHP Coders
i have 50 items that i want to display in 2 coloumns 25-25
item1-item2
item3-itme4
...........
itemn-itemn
i made this code
require ('admin/config.inc.php');
$connection = mysql_connect ("$host", "$username", "$password");
if ($connection == false){
echo mysql_errno().": ".mysql_error();
exit;
}
$query = "select ID,Category from sections";
$result = mysql_db_query ("$dbase", $query);
if ($result){
echo "<center>";
echo "<table border=0>";
echo "<tr><td><b>Category</b></td></tr>";
$numOfRows = mysql_num_rows ($result);
$col1=$numOfRows/2;
$col2=$numOfRows-$col1;
for ($i = 0; $i < $numOfRows; $i++){
$ID = mysql_result ($result, $i, "ID");
$Category = mysql_result ($result, $i, "Category");
echo "<tr><td><a href=\"display.php?step=2&cat=$ID\">$Category</a></td>";
#THIS PART BELOW PRODUCES WARNNING !!!
$ID = mysql_result ($result, $i++, "ID");
$Category = mysql_result ($result, $i++, "Category");
echo "<td><a href=\"display.php?step=2&cat=$ID\">$Category</a></td></tr>";
}
echo "</table>";
echo "</center>";
}
else{
echo mysql_errno().": ".mysql_error()."<BR>";
}
mysql_close ();
Warning: Unable to jump to row 52 on MySQL result index 14 in c:\program files\apache group\apache\htdocs\html\display.php on line 34
any suggestions plz
thnx a lot