View difference between Paste ID: ZWzxqbkS and PAe4F2wP
SHOW: | | - or go back to the newest paste.
1
<?php
2
$dbh = new PDO('mysql:host=localhost;dbname=reddit','root',"");
3-
print_r($dbh->query("SELECT id,title,user,subreddit,url from posts"));
3+
foreach($dbh->query("SELECT id,title,user,subreddit,url from posts") as $row) {
4
	print_r($row);
5
}
6
?>