I’m trying to do something amateurish
I have to be a professional to do what you say
I don’t know that much
It would be more correct to proceed with what I understand step by step.
1st.
For the total row
$top_page = ceil(
intval(
current(
$mysqli->query("SELECT COUNT(*) FROM multiswitchler")->fetch_row()
)
)
);
2nd.
To list the content
$result = $mysqli->query("SELECT
multiswitchler.id,
multiswitchler.urun_kodu,
multiswitchler.multiswitch_markasi,
multiswitchler.multiswitch_tipi,
multiswitchler.input,
multiswitchler.output,
multiswitchler.birim_fiyati,
multiswitchler.iskonto,
multiswitchler.multiswitch_para_birimi,
multiswitchler.multiswitch_adi,
multiswitchler.stok,
multiswitch_tipi.multi_tipi,
parabirimi.para_birimi,
markalar.urun_markasi
FROM multiswitchler
INNER JOIN parabirimi ON multiswitchler.multiswitch_para_birimi = parabirimi.id
INNER JOIN multiswitch_tipi ON multiswitchler.multiswitch_tipi = multiswitch_tipi.id
LEFT JOIN markalar ON multiswitchler.multiswitch_markasi = markalar.id
ORDER BY multiswitchler.id ASC LIMIT ".$start_from.", ".$limit);
It works fine so far (even if encoding is wrong)
3rd.
For content search
$result = $mysqli->query("SELECT
multiswitchler.id,
multiswitchler.urun_kodu,
multiswitchler.multiswitch_markasi,
multiswitchler.multiswitch_tipi,
multiswitchler.input,
multiswitchler.output,
multiswitchler.birim_fiyati,
multiswitchler.iskonto,
multiswitchler.multiswitch_para_birimi,
multiswitchler.multiswitch_adi,
multiswitchler.stok,
multiswitch_tipi.multi_tipi,
parabirimi.para_birimi,
markalar.urun_markasi
FROM multiswitchler
INNER JOIN parabirimi ON multiswitchler.multiswitch_para_birimi = parabirimi.id
INNER JOIN multiswitch_tipi ON multiswitchler.multiswitch_tipi = multiswitch_tipi.id
INNER JOIN markalar ON multiswitchler.multiswitch_markasi = markalar.id WHERE
multiswitchler.urun_kodu LIKE '$ara%' OR
markalar.urun_markasi LIKE '$ara%' OR
multiswitch_tipi.multi_tipi LIKE '$ara%' OR
multiswitchler.input LIKE '$ara' OR
multiswitchler.output LIKE '$ara' OR
multiswitchler.birim_fiyati LIKE '$ara%' OR
multiswitchler.iskonto LIKE '$ara' OR
parabirimi.para_birimi LIKE '$ara' OR
multiswitchler.multiswitch_adi LIKE '$ara%'
ORDER BY multiswitchler.id ASC LIMIT ".$start_from.", ".$limit);
The problem is here
How to get the number of search results?