Sponsor-Board.de

Normale Version: Webspell - Query Failed
Du siehst gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
Hallo Leute,

ich habe ein kleines Problem mit Webspell:
Die "Latest Matchs" werden nicht angezeigt. Statdessen steht dort ein Query failed..

Folgender Fehler Code:

Zitat:
Query failed:
errorno=1064
error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
query=SELECT * FROM ws_Gl2_clanwars ORDER BY date DESC LIMIT 0,


Da ich leider weder HTML noch von MySQL oder sonstigem Ahnung habe wäre es nett, wenn jemanden die Lösung hier posten könnte Wink



~EmPtyx

Hast du bei der Installation die wichtigen Dateien Berechtigung 777 gegeben ??
Oder hast du für die Latest Matchs nachträglich noch mal was Installiert ?
An den Latest Matchs habe ich nichts geändert.

Und ja, die Berechtigungen stimmen.
Schau in die Readme vom Design, da stehts meistens drin
Poste bitte den Inhalt der ensprechenden PHP Datei für last matches.

PHP-Code:
<?php
/*
######]####################################################################
#                                                                        #
#           Version 4       /                        /   /               #
#          -----------__---/__---__------__----__---/---/-               #
#           | /| /  /___) /   ) (_ `   /   ) /___) /   /                 #
#          _|/_|/__(___ _(___/_(__)___/___/_(___ _/___/___               #
#                       Free Content / Management System                 #
#                                   /                                    #
#                                                                        #
#                                                                        #
#   Copyright 2005-2011 by webspell.org                                  #
#                                                                        #
#   visit webSPELL.org, webspell.info to get webSPELL for free           #
#   - Script runs under the GNU GENERAL PUBLIC LICENSE                   #
#   - It's NOT allowed to remove this copyright-tag                      #
#   -- http://www.fsf.org/licensing/licenses/gpl.html                    #
#                                                                        #
#   Code based on WebSPELL Clanpackage (Michael Gruber - webspell.at),   #
#   Far Development by Development Team - webspell.org                   #
#                                                                        #
#   visit webspell.org                                                   #
#                                                                        #
##########################################################################
*/

$ergebnis=safe_query("SELECT * FROM ".PREFIX."clanwars ORDER BY date DESC LIMIT 0, ".$maxresults);
if(
mysql_num_rows($ergebnis)){
    echo
'<table width="100%" cellspacing="0" cellpadding="2">';
    
$n=1;
    while(
$ds=mysql_fetch_array($ergebnis)) {

        
$date=date("d.m.Y"$ds['date']);
        
$homescr=array_sum(unserialize($ds['homescore']));
        
$oppscr=array_sum(unserialize($ds['oppscore']));

        if(
$n%2) {
            
$bg1=BG_1;
            
$bg2=BG_2;
        }
        else {
            
$bg1=BG_3;
            
$bg2=BG_4;
        }

        if(
$homescr>$oppscr$result='<font color="'.$wincolor.'">'.$homescr.':'.$oppscr.'</font>';
        elseif(
$homescr<$oppscr$result='<font color="'.$loosecolor.'">'.$homescr.':'.$oppscr.'</font>';
        else 
$result='<font color="'.$drawcolor.'">'.$homescr.':'.$oppscr.'</font>';

        
$resultID=$ds['cwID'];
        
$gameicon="images/games/";
        if(
file_exists($gameicon.$ds['game'].".gif")) $gameicon $gameicon.$ds['game'].".gif";

        eval (
"\$results = \"".gettemplate("results")."\";");
        echo 
$results;
        
$n++;
    }
    echo
'</table>';
}
?>

1. Da ist extra ein Button um PHP-Code einzubinden

2. Probier mal das

PHP-Code:
<?php
/*
##########################################################################
# #
# Version 4 / / / #
# -----------__---/__---__------__----__---/---/- #
# | /| / /___) / ) (_ ` / ) /___) / / #
# _|/_|/__(___ _(___/_(__)___/___/_(___ _/___/___ #
# Free Content / Management System #
# / #
# #
# #
# Copyright 2005-2011 by webspell.org #
# #
# visit webSPELL.org, webspell.info to get webSPELL for free #
# - Script runs under the GNU GENERAL PUBLIC LICENSE #
# - It's NOT allowed to remove this copyright-tag #
# -- http://www.fsf.org/licensing/licenses/gpl.html #
# #
# Code based on WebSPELL Clanpackage (Michael Gruber - webspell.at), #
# Far Development by Development Team - webspell.org #
# #
# visit webspell.org #
# #
##########################################################################
*/

$ergebnis=safe_query("SELECT * FROM ".PREFIX."clanwars ORDER BY date DESC LIMIT 0,".$maxresults);
if(
mysql_num_rows($ergebnis)){
echo
'<table width="100%" cellspacing="0" cellpadding="2">';
$n=1;
while(
$ds=mysql_fetch_array($ergebnis)) {

$date=date("d.m.Y"$ds['date']);
$homescr=array_sum(unserialize($ds['homescore']));
$oppscr=array_sum(unserialize($ds['oppscore']));

if(
$n%2) {
$bg1=BG_1;
$bg2=BG_2;
}
else {
$bg1=BG_3;
$bg2=BG_4;
}

if(
$homescr>$oppscr$result='<font color="'.$wincolor.'">'.$homescr.':'.$oppscr.'</font>';
elseif(
$homescr<$oppscr$result='<font color="'.$loosecolor.'">'.$homescr.':'.$oppscr.'</font>';
else 
$result='<font color="'.$drawcolor.'">'.$homescr.':'.$oppscr.'</font>';

$resultID=$ds['cwID'];
$gameicon="images/games/";
if(
file_exists($gameicon.$ds['game'].".gif")) $gameicon $gameicon.$ds['game'].".gif";

eval (
"\$results = \"".gettemplate("results")."\";");
echo 
$results;
$n++;
}
echo
'</table>';
}
?>

Wenn das nicht klappt, dann setze ein paar umbrüche

PHP-Code:
<?php
/*
##########################################################################
# #
# Version 4 / / / #
# -----------__---/__---__------__----__---/---/- #
# | /| / /___) / ) (_ ` / ) /___) / / #
# _|/_|/__(___ _(___/_(__)___/___/_(___ _/___/___ #
# Free Content / Management System #
# / #
# #
# #
# Copyright 2005-2011 by webspell.org #
# #
# visit webSPELL.org, webspell.info to get webSPELL for free #
# - Script runs under the GNU GENERAL PUBLIC LICENSE #
# - It's NOT allowed to remove this copyright-tag #
# -- http://www.fsf.org/licensing/licenses/gpl.html #
# #
# Code based on WebSPELL Clanpackage (Michael Gruber - webspell.at), #
# Far Development by Development Team - webspell.org #
# #
# visit webspell.org #
# #
##########################################################################
*/

$ergebnis=safe_query("SELECT * 
FROM "
.PREFIX."clanwars 
ORDER BY date 
DESC LIMIT 0, "
.$maxresults);
if(
mysql_num_rows($ergebnis)){
echo
'<table width="100%" cellspacing="0" cellpadding="2">';
$n=1;
while(
$ds=mysql_fetch_array($ergebnis)) {

$date=date("d.m.Y"$ds['date']);
$homescr=array_sum(unserialize($ds['homescore']));
$oppscr=array_sum(unserialize($ds['oppscore']));

if(
$n%2) {
$bg1=BG_1;
$bg2=BG_2;
}
else {
$bg1=BG_3;
$bg2=BG_4;
}

if(
$homescr>$oppscr$result='<font color="'.$wincolor.'">'.$homescr.':'.$oppscr.'</font>';
elseif(
$homescr<$oppscr$result='<font color="'.$loosecolor.'">'.$homescr.':'.$oppscr.'</font>';
else 
$result='<font color="'.$drawcolor.'">'.$homescr.':'.$oppscr.'</font>';

$resultID=$ds['cwID'];
$gameicon="images/games/";
if(
file_exists($gameicon.$ds['game'].".gif")) $gameicon $gameicon.$ds['game'].".gif";

eval (
"\$results = \"".gettemplate("results")."\";");
echo 
$results;
$n++;
}
echo
'</table>';
}
?>

Und poste den error nochmal

Immernoch der selben Fehler:

Zitat:
Query failed:
•errorno=1064
error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL •server version for the right syntax to use near '' at line 1
•query=SELECT * FROM ws_Gl2_clanwars ORDER BY date DESC LIMIT 0,

dann probier doch mal die zweite variante und zeig davon den error. dann wissen wir immerhin mal, wo wir hinschauen müssen


setz mal in die erste zeile innerhalb der ph tags mal ein

PHP-Code:
$maxresults 4

rein, vermute der hat ein problem damit

Habe mal alle 3 Sachen ausprobiert und der Fehler ist immernoch da.
Seiten: 1 2
Referenz-URLs