If you use fetch() with the PDO::FETCH_ASSOC style it is easy to get both columns:
while($row = $sth->fetch(PDO::FETCH_ASSOC) { echo $row['prod_url']; echo $row['ean']; } By placing the fetch in a loop all of the rows will be returnreturned which you can then limit as you see fit.