« Project home page
my little forum
Log in
Register
Search:
Back to the entry by Auge
Post reply
Reply to the message by
Auge
Name:
E-mail:
(optional, won't be displayed directly)
Leave this field empty:
Homepage:
(optional)
Leave this field empty:
Location:
(optional)
Remember me (cookie)
Category:
General
Project organisation
Technics
Design/Themes
Features
Development
Todo
Bugs
German / Deutsch
Spanish / Español
French / Français
Accessibility/UX
Subject:
Formatting help
skip to input
format text bold
[b]bold text[/b]
format text italic
[i]italic text[/i]
insert hyperlink
[link=http://example.com/]link text[/link] / [link]http://example.com/[/link]
set text color
[color=#rgb]colored text[/color]
font size
[size=small]small text[/size]
[size=large]large text[/size]
insert list
[list][*]list item[/list]
insert image
[img]http://example.com/image.jpg[/img]
left: [img=left]http://example.com/image.jpg[/img]
right: [img=right]http://example.com/image.jpg[/img]
thumbnail: [img=thumbnail]http://example.com/image.jpg[/img]
thumbnail left: [img=thumbnail-left]http://example.com/image.jpg[/img]
thumbnail right: [img=thumbnail-right]http://example.com/image.jpg[/img]
upload image
upload image ...
insert TeX code
[tex]TeX code[/tex]
insert code
[inlinecode]code[/inlinecode]
[code]code[/code]
[code=css]code[/code]
[code=html]code[/code]
[code=javascript]code[/code]
[code=perl]code[/code]
[code=php]code[/code]
[code=sql]code[/code]
[code=xml]code[/code]
:-)
;-)
:-P
:-D
:-|
:-(
:yes:
:no:
:ok:
:lol:
:lol2:
:lol3:
:cool:
:surprised:
:angry:
:crying:
:waving:
:confused:
:lookaround:
:clap:
:love:
:tick:
Message:
> Hallo > > > neues Problem: > > Wenn ich die Kategorie rechts von einem Eintrag anklicke, also z.B. (Allgemein) > > > > BITTE zuerst LESEN! Forum-Richtlinien - Fritz, 29.05.2019, 15:03 [*] [!] [○] [x] (Allgemein) > > > > dann erhalte ich folgende Fehlermeldungen: > > > > Fatal error: Uncaught mysqli_sql_exception: 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 'AND spam_list.id IS NULL AND (sticky = 2 OR category = '4')' at line 1 in .../forum/includes/index.inc.php:76 Stack trace: #0 .../forum/includes/index.inc.php(76): mysqli_query(Object(mysqli), ' AND spam_list....') #1 .../forum/index.php(138): include('...') #2 {main} thrown in .../forum/includes/index.inc.php on line 76 > > ich habe mal deine Fehlermeldung anonymisiert, soweit ich es konnte, und habe den betreffenden Query aus dem PHP-Code und den Angaben in der Fehlermeldung rekonstruiert, soweit mir das mit der Website von Github möglich war. > > [code=sql]SELECT COUNT(*) FROM " . $db_settings['forum_table'] . " AS ft > LEFT JOIN ( > SELECT eid > FROM " . $db_settings['akismet_rating_table'] . " > WHERE " . $db_settings['akismet_rating_table'] . ".spam = 1 > UNION SELECT eid > FROM " . $db_settings['b8_rating_table'] . " > WHERE " . $db_settings['b8_rating_table'] . ".spam = 1 > ) AS spam_list ON spam_list.eid = ft.id > WHERE pid = 0 > AND spam_list.id IS NULL > AND (sticky = 2 OR category = '4') [/code] > > @Micha: Selektiert wird eine anonyme Spalte ([inlinecode]COUNT(*)[/inlinecode]), wobei die Postingtabelle mit einem UNION-SELECT über die Spam-Tabellen gejoint wird. Im UNION-SELECT wird aus den Spam-Tabellen die Spalte [inlinecode]eid[/inlinecode] ausgewählt. In den folgenden WHERE-Klauseln der äußeren Abfrage wird aber darauf geprüft, ob die Spalte [inlinecode]id[/inlinecode] (ohne "e", "eid" versus "id"!) [inlinecode]NULL[/inlinecode] ist. Das haut doch nicht hin, oder? > > Tschö, Auge
E-mail notification on reply of this posting
OK - Submit
Preview