garvinhicking wrote:Maybe the =& is already a problem and "disturbs" your PHP memory. Try to remove the "&" and see if that changes things.
Nope, doesn't change anything.
garvinhicking wrote:Else, below the query do an "echo $querystring" so that we can get the actual SQL code that's created for your search. This should help to see if the query itself looks proper.
Code: Select all
SELECT e.id, e.authorid, a.realname AS author, e.allow_comments, e.moderate_comments, a.email, e.timestamp, e.comments, e.title, e.body, e.extended, e.trackbacks, e.exflag, e.isdraft, e.last_modified, a.username AS loginname FROM serendipity_entries e LEFT JOIN serendipity_authors a ON e.authorid = a.authorid LEFT JOIN serendipity_entrycat ec ON e.id = ec.entryid LEFT JOIN serendipity_category c ON ec.categoryid = c.categoryid LEFT JOIN serendipity_authorgroups AS acl_a ON acl_a.authorid = 0 LEFT JOIN serendipity_access AS acl_acc ON ( acl_acc.artifact_mode = 'read' AND acl_acc.artifact_type = 'category' AND acl_acc.artifact_id = c.categoryid ) WHERE (MATCH(title,body,extended) AGAINST('Webdesign')) AND isdraft = 'false' AND timestamp <= 1340028000 AND ( c.categoryid IS NULL OR ( acl_acc.groupid = 0) OR ( acl_acc.artifact_id IS NULL ) ) GROUP BY e.id ORDER BY timestamp DESC LIMIT 1SELECT e.id, e.authorid, a.realname AS author, e.allow_comments, e.moderate_comments, a.email, e.timestamp, e.comments, e.title, e.body, e.extended, e.trackbacks, e.exflag, e.isdraft, e.last_modified, a.username AS loginname FROM serendipity_entries e LEFT JOIN serendipity_authors a ON e.authorid = a.authorid LEFT JOIN serendipity_entrycat ec ON e.id = ec.entryid LEFT JOIN serendipity_category c ON ec.categoryid = c.categoryid LEFT JOIN serendipity_authorgroups AS acl_a ON acl_a.authorid = 0 LEFT JOIN serendipity_access AS acl_acc ON ( acl_acc.artifact_mode = 'read' AND acl_acc.artifact_type = 'category' AND acl_acc.artifact_id = c.categoryid ) WHERE (MATCH(title,body,extended) AGAINST('Webdesign*' IN BOOLEAN MODE)) AND isdraft = 'false' AND timestamp <= 1340028000 AND ( c.categoryid IS NULL OR ( acl_acc.groupid = 0) OR ( acl_acc.artifact_id IS NULL ) ) GROUP BY e.id ORDER BY timestamp DESC LIMIT 1
(for a "Webdesign" query, which gives back false search results)
garvinhicking wrote:You could execute the exact query in phpmyadmin to see if that yields the same "wrong" results.
#1064 - 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 '1SELECT e.id, e.authorid, a.realname AS author, e.allow_comments, e.moderate_com' at line 1
It's possible I used this the wrong way: I pasted the result of 'echo $querystring' in phpmyadmin (have to paste this in German, sorry) → Abfrageeditor → SQL-Befehl in der Datenbank xy – is that what I was supposed to do?
garvinhicking wrote:Another thing that could be interfering is a patch that I believe onli did to the extension of the query in case too few search results were found. I see a hardcoded "< 4" in there, maybe if your pagination has less than 5 items per page, this could exactly be your trouble. In that case we'd need to patched that function and ask why there's a hardcoded 4 in there.

I can easily patch stuff there if you need a guinea pig. The blog is not updated, but rsync'd frequently.
YL