Hi
What do I need to do to check the number of results obtained (or not) if I use the following code ?
$sql ="SELECT etc";
$conn = new PDO(vars etc);
$sth = $conn -> prepare($sql);
$sth->execute();
$res = $sth->fetchAll();
$sth->closeCursor();
I tried doing count($res) but that doesn't seem to be correct - there must be an inbuilt method for returning the number of rows, like mysql_num_rows()
can someone point me in the right direction please ?
thanks