Uncaught exception 'PDOException'

Hi, ive had a working script (for many years :slight_smile: ) , 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

Sorry, ignore this…like some kind of **** i didnt add the basic SELECT…sigh

Ah, the blatantly obvious error. Happens to everyone at some point in time…