commit d16d34b6127b153c9644db4e0e92748a5dc1acdf
parent cf03a517012604ba8aea8adc8f8746de86a80a84
Author: MTRNord <mtrnord1@gmail.com>
Date: Sun, 23 Nov 2014 14:29:28 +0100
finish fix (maybe)
Diffstat:
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/core/backend/blog/posts.php b/core/backend/blog/posts.php
@@ -22,9 +22,9 @@
# $post_categrory = "bug?";
#}else{
//Check if Data in it
- function read()
- if ($resultat = $connection->query('SELECT * FROM posts WHERE id LIKE $id')) {
- echo 'SELECT * FROM posts WHERE id LIKE $id';
+ function read(){
+ if ($resultat = $connection->query('SELECT * FROM posts WHERE id LIKE '.$id)) {
+ echo 'SELECT * FROM posts WHERE id LIKE '.$id;
//Put database data in variables
while($daten = $resultat->fetch_object() ){
$post_id = $daten->id;
@@ -45,7 +45,10 @@
$post_date = "Database error!";
$post_categrory = "Database error!";
}
-
+ if ($read != 0){
+ read();
+ }
+ }
#}
diff --git a/themes/jumbotron/index.php b/themes/jumbotron/index.php
@@ -12,6 +12,7 @@
}
include('../../core/backend/blog/posts.php');
include('../../core/config/variables.config.php')
+ $read = 0;
?>
<!DOCTYPE html>
<html lang="en">
@@ -85,6 +86,7 @@
if ($empty){
if ($post_title != "Database Error!"){
while (!empty($post_title)){
+ $read = 1;
$id = $x;
echo "<a href='index.php?id=$x' rel='bookmark'> $post_title </a>";
$x = $x+1;