Hello,
I can’t run the following PDO query
I’m trying to switch from MySQLi to PDO
Can you help me
$amplifier_markasorgu = $PDO->prepare("
SELECT DISTINCT
markalar.urun_markasi
FROM multiswitch_amplifier
JOIN markalar ON multiswitch_amplifier.amplifier_markasi = markalar.id
ORDER BY markalar.urun_markasi ASC");
$amplifier_marka_array = array();
if ($result = $PDOdb->prepare($amplifier_markasorgu)) {
$adet = $amplifier_markasorgu->fetchColumn();
if ($adet > 0) {
while ($row = $amplifier_markasorgu->fetch()){
$amplifier_marka_array[] = $row['urun_markasi'];
}
}
}