I have the following code which displays only 1 result. However, I have six rows in my database with product_id = ‘1’. I’m talking about $order, only one shows up, instead of six. What is wrong?
$get = "SELECT * FROM artikelbestelling WHERE product_id = '1' LIMIT 0, 500";
$doget = mysql_query($get) or die(mysql_error());
while($row = mysql_fetch_assoc($doget))
{
$order = $row['ordernummer'];
$artikel = $row['artikelnummer'];
echo "<strong>$order</strong><br />";
}
My database structure:
id (primary & autoincrement)(int 11)
product_id (int 11)
number (int 11)
ordernummer (int 11)
as your id is int, you dont need to use ”