Hi everyone I am trying to echo out some table id’s. I echo out a few but it always misses the first table for example id 1. This is the code I have so far [code] try{
$stmt = $dbh->prepare(‘SELECT * FROM forum’);
$stmt->execute();
$row = $stmt->fetch(PDO::FETCH_ASSOC);
if($row != 0){
while($row = $stmt->fetch(PDO::FETCH_ASSOC))
{
echo $row['id'] ."/ ";
}
}
}
catch (PDOException $e){
echo $e->getMessage();
} [/code]
When this is run I get 6/ 5/ when it should be 5 6 7