Hi, ive had a working script (for many years ) , and i need to move from msql to PDO.
Other queries on the pages are fine, however this on is failing. Obvioulsy its something to do with the query structure that is conflicting with the pdo functions, but ive no idea where to start to rectify it.
<?php
$sub = $pdo->query("
e.*, m.title
FROM
events2 AS e
INNER JOIN menu1 AS m ON (m.title=e.cat1 OR m.title=e.cat2 OR m.title=e.cat3 ) WHERE
e.show_whatson='yes'
AND enddate>CURRENT_DATE
GROUP BY
m.title ORDER BY m.position ASC");
$sub->execute();
while ( $ss = $sub->fetch(PDO::FETCH_ASSOC)) {
$ss1 = str_replace(" ", "-", $ss['title']);
?>
Thanks in advance