. **/ ?>
prepare("SELECT b.id, b.title, u.fullname AS owner, b.date, b.published, GROUP_CONCAT(bt.tag SEPARATOR ';') FROM blog AS b INNER JOIN users AS u ON (u.id=b.owner) LEFT JOIN blog_tags AS bt ON (bt.blogentry=b.id) WHERE b.owner=:uid GROUP BY b.id ORDER BY date DESC"); $sql->execute(array(":uid"=>$_SESSION['id'])); } else{ $sql=$db->prepare("SELECT b.id, b.title, u.fullname AS owner, b.date, b.published, GROUP_CONCAT(bt.tag SEPARATOR ';') AS tags FROM blog AS b INNER JOIN users AS u ON (u.id=b.owner) LEFT JOIN blog_tags AS bt ON (bt.blogentry=b.id) GROUP BY b.id ORDER BY date DESC"); $sql->execute(); } while($row=$sql->fetch(PDO::FETCH_ASSOC)){ echo " "; } ?>
".$row['title']." ".$row['tags']." ".$row['owner']." ".$row['date']." ".($row['published']==1?$lang['tyes']:$lang['tno'])."