I have a MySQL server and I want to grab X lines from a database with a PHP instruction. Here is my command and my database info (quote = "Q-1-Rev04"):
$quoteLineRequest = "SELECT `id`, `quantity`, `unitprice`, `goodsref` FROM `quoteline`
WHERE `quote` = '".$quoteid."'";
if($result = mysqli_query($link, $quoteLineRequest)){
if (mysqli_num_rows($result) > 0){
$quoteLines = mysqli_fetch_assoc($result);
var_dump($quoteLines);
}
}
but when i'm var_dumping $quoteLines, it only give me 4 results instead of the 12 expected:
array(4) { ["id"]=> string(3) "113" ["quantity"]=> string(4) "1100" ["unitprice"]=> string(4) "0.26" ["goodsref"]=> string(8) "100-0011" }
Why all corresponding values are not grabbed?