commit fb841839bbd6ecfe76a52d825c7ceaec97b95c9e parent bf0d5e41a6204ec58a141d77dc77416aa462a66b Author: MTRNord <mtrnord1@gmail.com> Date: Sun, 23 Nov 2014 14:43:13 +0100 try to fix database connection Diffstat:
| M | core/backend/blog/posts.php | | | 13 | +++++++------ |
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/core/backend/blog/posts.php b/core/backend/blog/posts.php @@ -7,12 +7,7 @@ * @author Marcel Radzio <info@nordgedanken.de> * @version 0.2 17/08/2014 19:39 */ - include('../../core/config/connect.db.inc.php'); - //Check if Database connection established - if (mysqli_connect_errno()) { - printf("Verbindung fehlgeschlagen: %s\n", mysqli_connect_error()); - exit(); - } + #if ($empty){ # $post_id = "bug?"; # $post_title = "bug?"; @@ -24,6 +19,12 @@ //Check if Data in it read(); function read(){ + include('../../core/config/connect.db.inc.php'); + //Check if Database connection established + if (mysqli_connect_errno()) { + printf("Verbindung fehlgeschlagen: %s\n", mysqli_connect_error()); + exit(); + } if ($resultat = $connection->query('SELECT * FROM posts WHERE id LIKE '.$id)) { echo 'SELECT * FROM posts WHERE id LIKE '.$id; //Put database data in variables