Hello,
I have a problem
Registered users and visitors can generate price offers. No problem here
If a registered member generating a offer
in the offers table
offers.members_id => 1
offers.members_group => 1
offers.name_surname => Adem GENÇ
There is no problem with such records, offers are listed
If a guest generating a offer
in the offers table
offers.members_id => none OR null
offers.members_group => none OR null
offers.name_surname => Guest
These entries are not listed due to INNER JOIN
That is, since there is no such member in the members table
How do I list offers from both registered members and guests?
what’s your suggestions?
$sql = 'SELECT
offers.id,
offers.offer_no,
offers.offer_date,
offers.members_id,
offers.members_group,
offers.name_surname,
offers.pdf_dosya_adi,
offers.secilen_parabirimi_id,
offers.musteri_bilgileri_json,
offers.firma_bilgileri_json,
members.members_group,
members.firma_adi,
members.name_surname,
members.firma_emaili
FROM offers
INNER JOIN members ON offers.members_id = members.members_id
WHERE
offers.offer_no LIKE '.$search_keyword.' OR
offers.offer_tarihi LIKE '.$search_keyword.' OR
offers.musteri_bilgileri_json LIKE '.$search_keyword.' OR
offers.members_id LIKE '.$search_keyword.' OR
offers.siparis_durumu LIKE '.$search_keyword.' OR
members.firma_adi LIKE '.$search_keyword.' OR
members.name_surname LIKE '.$search_keyword.' OR
members.firma_emaili LIKE '.$search_keyword.'
ORDER BY offers.id DESC ';