Ich hoffe mir kann jemand Helfen ich habe mein Blogsystem wieder gefunden und nun ist ein Fehler angetreten, da ich aber nicht mehr so viel PHP kann brauche ich mal Hilfe.
Die Fehlermeldung ist folgende:
Zitat
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /usr/www/users/phxlwe/orux/inc/config.php on line 36
<?php
class news extends datenbank
{
public function newseintrage($int)
{
$this->news = $this->query('SELECT * FROM cms ORDER by id DESC');
while($this->eintrag = $this->fetch_object($this->news))
{
print '<h3><a href="index.php?id='.$this->eintrag->id.'">'.$this->eintrag->Headline.'</a></h3><p>'.nl2br(htmlentities(htmlspecialchars(substr(utf8_decode($this->eintrag->Eintrag),0,250)))).'</p><div><small>Eingetragen von <b>'.$this->eintrag->Name.'</b> am <strong>'.date('d. F Y', $this->eintrag->Datum).', '.date('h:i', $this->eintrag->Datum).'</strong></small></div><br>';
}
}
public function allekommentare($id)
{
$this->kommentar = $this->query('SELECT * from kommentar WHERE kid = "'.$id.'" ORDER by id DESC');
while($this->event = $this->fetch_object($this->kommentar))
{
print '<div class="rahmen"><h3>'.$this->event->user.' sagt:</h3><div><small><strong>'.date('d. F Y', $this->event->zeit).' um '.date('h:i', $this->event->zeit).'</strong></small></div><p>'.nl2br(htmlentities(htmlspecialchars(substr(utf8_decode($this->event->text),0,68000)))).'</p></div>';
}
}
public function einzeleintrag($id)
{
$this->news = $this->query('SELECT * FROM cms WHERE id = "'.$id.'"');
$this->eintrag = $this->fetch_object($this->news);
print '<h3>'.$this->eintrag->Headline.'</h3><p>'.nl2br(htmlentities(htmlspecialchars(substr(utf8_decode($this->eintrag->Eintrag),0,10000000)))).'</p><div><small>Eingetragen von <b>'.$this->eintrag->Name.'</b> am <strong>'.date('d. F Y', $this->eintrag->Datum).', '.date('h:i', $this->eintrag->Datum).'</strong></small></div><br><form action="post.php" method="post"><input type="hidden" name="kid" value="'.$this->eintrag->id.'">Dein Name:<br><input type="text" name="user"><br>Homepage (freiwillig):<br><input type="text" name="homepage"><br>Deine Botschaft:<br><textarea cols="55" rows="5" name="text"></textarea><br><input type="submit" value="Eintragen"><input type="reset" value="Zurücksetzen"></form>';
}
}
?>