Page 1 of 1

Yet more search function problems....

Posted: Fri Oct 22, 2004 7:04 am
by AntiGenX
I searched the forums and didn't seem to find anyone with the same problem as me. (though it's possible that I missed a solution if one already exists.)

I'm running MySQL 4.0.20 and PHP 4.3.9. I've checked my database and the entries table does have an index of entry_id (FULLTEXT title body extended etc...) BUT I still don't get any returs from queries. I put an echo in the query string so I could catch the output:

Code: Select all

SELECT e.id, e.author, a.username, a.email, ec.categoryid, e.timestamp, e.comments, e.title, e.body, e.extended, e.trackbacks, e.exflag FROM s_entries e, s_authors a, s_entrycat ec WHERE a.authorid = e.authorid AND e.id = ec.entryid AND MATCH(title,body,extended) AGAINST('Judging') AND isdraft = 'false' AND timestamp <= 1098420672 GROUP BY e.id ORDER BY timestamp DESC
All seems well but alas "No Entries Found for Query Judging"
Any hints where to go from here would be greatly appreciated.

Posted: Fri Oct 22, 2004 8:13 am
by tadpole
What does a var_dump() on the result of the query say?

Posted: Fri Oct 22, 2004 7:27 pm
by AntiGenX
OK, I dropped in a var_dump($querystring) and here's what I got...

Code: Select all

string(1039) "SELECT e.id, e.author, a.username, a.email, ec.categoryid, e.timestamp, e.comments, e.title, e.body, e.extended, e.trackbacks, e.exflag FROM s_entries e, s_authors a, s_entrycat ec WHERE a.authorid = e.authorid AND e.id = ec.entryid AND MATCH(title,body,extended) AGAINST('Judging') AND isdraft = 'false' AND timestamp <= 1098465789 GROUP BY e.id ORDER BY timestamp DESC" No Entries Found for Query Judging

Posted: Fri Oct 22, 2004 11:27 pm
by tadpole
I meant var_dump() of what serendipity_db_query($querystring) returns, which should tell you exactly what (if anything) MySQL had a problem with. Sorry for the ambiguity.

Posted: Mon Oct 25, 2004 6:49 pm
by AntiGenX
serendipity_db_query($querystring); returns 1.

Posted: Mon Oct 25, 2004 6:54 pm
by AntiGenX
OK I changed the code to var_dump(serendipity_db_query($querystring));. I'm guessing that's what you were looking for? That gives me "boot(true)"

Posted: Mon Oct 25, 2004 7:03 pm
by AntiGenX
hehe. I think was supposed to be "bool(true)" ;-)