Hello im trying to set my page up so that it will load only so many listings of the itemname from the database. I set up this code that i think should work but its showing all of the itemnames instead of just 2. Can somone please show me what im doing wrong with this snippet? There arent any errors appearing its just not working how I like it. Thanks!
col = 0;
do {
// As long as fields exist in that category get them
while ($row = mysql_fetch_array($retid)) {
$number = $row["number"];
$photo = $row["photo"];
$description = $row["description"];
$volume = $row["volume"];
$dimension = $row["dimension"];
$wholesale = $row["wholesale"];
$oem = $row["oem"];
$casepack = $row["casepack"];
$cpoem = $row["cpoem"];
$color = $row["color"];
$retail = $row["retail"];
$category = $row["category"];
$field1 = $row["field1"];
$field2 = $row["field2"];
$field3 = $row["field3"];
$field4 = $row["field4"];
$field5 = $row["field5"];
$field6 = $row["field6"];
$capacity = $row["capacity"];
$itemname = $row["itemname"];
$col++;
echo ($itemname);
}} while($col < 2);
?>