blackybaby
Benutzer
- Beiträge
- 5
Hallo zusammen
Bin blutiger Anfänger was Datenbanken betrifft und hab nun folgende Fehlerausgabe in einem Forum, wo ich mithelfe. Hoffe ihr könnt mir da weiterhelfen.
Hab folgende Fehlerausgabe:
Database error in WoltLab Burning Board (2.3.6 pl2): Invalid SQL: SELECT smiliepath, smilietitle, smiliecode,catname FROM bb1_smilies WHERE catname='' ORDER BY smilieid ASC LIMIT -24, 24
mysql error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-24, 24' at line 1
mysql error number: 1064
mysql version: 5.5.52-MariaDB
php version: 5.3.29
Date: 27.03.2017 @ 22:13
Script: /wbb2/misc.php?action=moresmilies
Könnt ihr mir da bitte weiterhelfen?
Häng euch mal den Teil mit den Smilies aus der misc.php mit an
Bin blutiger Anfänger was Datenbanken betrifft und hab nun folgende Fehlerausgabe in einem Forum, wo ich mithelfe. Hoffe ihr könnt mir da weiterhelfen.
Hab folgende Fehlerausgabe:
Database error in WoltLab Burning Board (2.3.6 pl2): Invalid SQL: SELECT smiliepath, smilietitle, smiliecode,catname FROM bb1_smilies WHERE catname='' ORDER BY smilieid ASC LIMIT -24, 24
mysql error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-24, 24' at line 1
mysql error number: 1064
mysql version: 5.5.52-MariaDB
php version: 5.3.29
Date: 27.03.2017 @ 22:13
Script: /wbb2/misc.php?action=moresmilies
Könnt ihr mir da bitte weiterhelfen?
Häng euch mal den Teil mit den Smilies aus der misc.php mit an
PHP:
/** more smilies popup **/
if($action=="moresmilies") {
$lang->load("MISC");
$all_smilies = $lang->items['LANG_MISC_CATEGORIE_ALL_SMILIE'];
if(isset($_GET['catname'])) $catname=$_GET['catname'];
elseif(isset($_POST['catname'])) $catname=$_POST['catname'];
else $catname="";
if($catname=="")
{
$standard = $db->query_first("SELECT * FROM bb".$n."_smilies_categorie WHERE standard=1");
$catname=$standard['catname'];
}
$sel_cate[$catname]=" selected=\"selected\"";
if($catname==$all_smilies){
list($smiliecount) = $db->query_first("SELECT COUNT(*) FROM bb".$n."_smilies");
$smiliecount2=$smiliecount;
}else{
list($smiliecount2) = $db->query_first("SELECT COUNT(*) FROM bb".$n."_smilies");
list($smiliecount) = $db->query_first("SELECT COUNT(*) FROM bb".$n."_smilies WHERE catname='$catname'");
}
$smilie_categorie="<option value=\"$all_smilies\" selected=\"selected\">$all_smilies($smiliecount2)</option>";
$result = $db->query("SELECT * FROM bb".$n."_smilies_categorie ORDER BY catorder ASC");
while($row = $db->fetch_array($result))
{
if($row['catname']==$catname) $smilie_categorie.="<option value=\"$row[catname]\"$sel_cate[$catname]>$row[catname]($row[counter])</option>";
else $smilie_categorie.="<option value=\"$row[catname]\">$row[catname]($row[counter])</option>";
}
if(isset($_GET['page']))
{
$page=intval($_GET['page']);
if($page==0) $page=1;
}else $page=1;
if(isset($_POST['smilieseite'])) $page=$_POST['smilieseite'];
$smiliesperpage="24";
$pages = ceil($smiliecount/$smiliesperpage);
if($page>$pages) $page=$pages;
if($pages>1 && $catname<>$all_smilies) $pagelink=makepage_smilies($smiliecount,"misc.php?action=moresmilies&catname=$catname".$SID_ARG_2ND,$page,$smiliesperpage);
elseif($pages>1 && $catname==$all_smilies) $pagelink=makepage_smilies($smiliecount,"misc.php?action=moresmilies&catname=$all_smilies".$SID_ARG_2ND,$page,$smiliesperpage);
else $pagelink="";
$rightorleft = "left";
if($showsmiliesrandom==1)
{
if($catname==$all_smilies) $result = $db->unbuffered_query("SELECT smiliepath, smilietitle, smiliecode,catname FROM bb".$n."_smilies ORDER BY RAND()",0,$smiliesperpage,$smiliesperpage*($page-1));
else $result = $db->unbuffered_query("SELECT smiliepath, smilietitle, smiliecode,catname FROM bb".$n."_smilies WHERE catname='$catname' ORDER BY RAND()",0,$smiliesperpage,$smiliesperpage*($page-1));
}else{
if($catname==$all_smilies) $result = $db->unbuffered_query("SELECT smiliepath, smilietitle, smiliecode,catname FROM bb".$n."_smilies ORDER BY smilieorder ASC",0,$smiliesperpage,$smiliesperpage*($page-1));
else $result = $db->unbuffered_query("SELECT smiliepath, smilietitle, smiliecode,catname FROM bb".$n."_smilies WHERE catname='$catname' ORDER BY smilieid ASC",0,$smiliesperpage,$smiliesperpage*($page-1));
}
$j=0;
$popup_smiliesbits="";
while($row = $db->fetch_array($result))
{
$row['smilietitle']=getlangvar($row['smilietitle'], $lang);
$row['smiliename']=htmlconverter($row['smiliecode']);
$row['smiliecode']=addcslashes($row['smiliecode'], "'\\");
$row['smiliepath'] = replaceImagefolder($row['smiliepath']);
eval ("\$popup_smiliesbits .= \"".$tpl->get("popup_smiliesbits")."\";");
if ($rightorleft == "left")
{
$j++;
$rightorleft = "right";
}else $rightorleft = "left";
}
$j++;
$tdclass=getone($j,"tableb","tablea");
if($rightorleft == "right") $popup_smiliesbits .= "<td class=\"$tdclass\"> </td><td class=\"$tdclass\"> </td></tr>";
eval("\$tpl->output(\"".$tpl->get("popup_smilies")."\");");
}