-
fetch()) {
?>
- ">
prepare("SELECT a.id, a.date, a.title, a.text, a.video, a.video_type, (case when img.id is not null then count(*) else 0 end) as imgNum FROM article a LEFT JOIN image img on a.id = img.article WHERE a.category=1 AND a.is_live='Y' AND a.permalink=? group by a.id, a.date, a.title, a.text;"); $stmt->bind_param('s', $permalink); if (!$stmt->execute()) { echo $mysqli->error; } $stmt->bind_result($id, $date, $title, $text, $video, $videoType, $imgNum); if (!$stmt->fetch()) { echo "ASD"; echo $mysqli->error; } $stmt->close(); $customTitle = 'Novice - '.$title; $menu = 00; $nextPermalink = $prevPermalink = ""; $nextStmt = $mysqli->prepare("SELECT next.permalink FROM article this LEFT JOIN article next ON this.id <> next.id WHERE next.category = this.category AND this.id=? AND ((next.date = this.date AND next.id > this.id) OR next.date > this.date) AND next.is_live = 'Y' ORDER BY next.date ASC LIMIT 1;"); $nextStmt->bind_param('i', $id); $nextStmt->execute(); $nextStmt->bind_result($nextPermalink); if (!$nextStmt->fetch()) { } $nextStmt->close(); $prevStmt = $mysqli->prepare("SELECT prev.permalink FROM article this LEFT JOIN article prev ON this.id <> prev.id WHERE prev.category = this.category AND this.id=? AND ((prev.date = this.date AND prev.id < this.id) OR prev.date < this.date) AND prev.is_live = 'Y' ORDER BY prev.date DESC LIMIT 1;"); echo $mysqli->error; $prevStmt->bind_param('i', $id); $prevStmt->execute(); $prevStmt->bind_result($prevPermalink); if (!$prevStmt->fetch()) { } $prevStmt->close(); $platnicaPath = "http://www.dtcbanko.com".prvaSlikaNovice($largePath, $id, $mysqli); $additionalMeta = ''; $additionalMeta .= ''; $additionalMeta .= ''; $additionalMeta .= ''; ?>