rpicms

A CMS for the Raspberry Pi
git clone git://archive.git.mtrnord.blog/RpicmsTeam/rpicms.git
Log | Files | Refs | README | LICENSE

commit 653c7071dc739febebee612acf71b5f3266c9c25
parent 06048ccdb173cef3266b342042d60723a35d9944
Author: MTRNord <mtrnord1@gmail.com>
Date:   Sat, 13 Dec 2014 12:43:31 +0100

try to fix to much posts :/

Diffstat:
Mcore/backend/blog/posts.php | 11+++++++++--
Mthemes/jumbotron/index.php | 2+-
2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/core/backend/blog/posts.php b/core/backend/blog/posts.php @@ -20,6 +20,13 @@ } #$resultat->close(); } + if ($resultat = $connection->query("SELECT * FROM posts WHERE category LIKE '$category'")) { + while($daten = $resultat->fetch_object() ){ + $category_id_clean = $daten->id; + #var_dump($daten); + } + #$resultat->close(); + } next_id_only(); next_id_category(); function next_id_category(){ @@ -62,7 +69,7 @@ function read_category(){ - global $category, $connection, $read, $post_id_clean; + global $category, $connection, $read, $category_id_clean; global $post_id, $post_title, $post_text, $post_author, $post_date, $post_categrory, $post_text_short; if ($resultat = $connection->query("SELECT * FROM posts WHERE category LIKE '$category' ")) { //echo 'SELECT * FROM posts WHERE id LIKE '.$id; @@ -79,7 +86,7 @@ } $resultat->close(); } else { - global $category, $connection, $read, $post_id_clean; + global $category, $connection, $read, $category_id_clean; global $post_id, $post_title, $post_text, $post_author, $post_date, $post_categrory; global $error; $error = "1"; diff --git a/themes/jumbotron/index.php b/themes/jumbotron/index.php @@ -170,7 +170,7 @@ if ($category){ #$id = 1; include('../../core/backend/blog/posts.php'); - while ($x < $post_id_clean+1){ + while ($x < $category_id_clean+1){ include('../../core/config/connect.db.inc.php'); echo " <h1>