Hello
I have two tables
1st, table name: kayitlar
AND I have two columns
A) lnbler_id(3, 5) - $teklifkayitlari[‘lnbler_id’]
B) lnbler_quantity(1, 2) - $teklifkayitlari[‘lnbler_quantity’]
2nd, table name: lnbler (The following table)
My question is:
I list products into the array with ID, no problem here
I want to include the Product Quantity in this series
Sample:
-----Product name -----|----- Product Quantity
ID3 – QATTRO LNB --|----- 1
ID5 – MDU5 LNB ------|------2
$teklif_mdulnb = $mysqli->query("
SELECT
lnbler.id,
lnbler.urun_kodu,
lnbler.lnb_markasi,
lnbler.lnb_tipi,
lnbler.mdu_tipi,
lnbler.lnb_cikisi,
lnbler.lnb_fiyati,
lnbler.lnb_para_birimi,
lnbler.iskonto,
lnbler.stok,
lnbler.lnb_adi,
markalar.urun_markasi
FROM lnbler
INNER JOIN markalar ON lnbler.lnb_markasi = markalar.id
WHERE lnbler.id IN (".$teklifkayitlari['lnbler_id'].")");
while ($teklifmdulnb = $teklif_mdulnb->fetch_assoc()) {
$urunler[] = ['urun'=>'lnbler',
'urun_kodu'=>$teklifmdulnb['urun_kodu'],
'marka'=>$teklifmdulnb['urun_markasi'],
'urun_adi'=>$teklifmdulnb['mdu_tipi'],
'quantity'=>$quantity,
'b_fiyati'=>$teklifmdulnb['lnb_fiyati'],
'para_birimi'=>$teklifmdulnb['lnb_para_birimi'],
'iskonto'=>$mdulnb_isk,
'id'=>$teklifmdulnb['id']];
}