Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
fondy
Regular
Regular



Joined: Sep 12, 2003
Posts: 63

PostPosted: Mon Feb 07, 2005 4:10 pm Reply with quote

Hello.

I have trouble with the search module. I am using version 6.5 and patched with chatserves 2.8 version. When I search for something only a few articles comes up, not all of them. I have checked the search modules index.php and found this:

$q = "select s.sid, s.aid, s.informant, s.title, s.time, s.hometext, s.bodytext, a.url, s.comments, s.topic from ".$prefix."_stories s, ".$prefix."_authors a where s.aid=a.aid $queryalang $categ";
if (isset($query)) $q .= "AND (s.title LIKE '%$query%' OR s.hometext LIKE '%$query%' OR s.bodytext LIKE '%$query%' OR s.notes LIKE '%$query%') ";

In older versions of php nuke an author could have an id like John Hansen. Now you can not have spaces between these and you have to rename the id to JohnHansen.

In the search module there are: .... where stories.aid=authors.aid ....

Do I have to delete the spaces between names in the authors table to correct the problem?

regards fondy
 
View user's profile Send private message
fondy







PostPosted: Tue Feb 08, 2005 4:48 am Reply with quote

Have changed line 186:

$q = "select s.sid, s.aid, s.informant, s.title, s.time, s.hometext, s.bodytext, a.url, s.comments, s.topic from ".$prefix."_stories s, ".$prefix."_authors a where s.aid=a.aid $queryalang $categ";

to this:

$q = "select s.sid, s.aid, s.informant, s.title, s.time, s.hometext, s.bodytext, a.url, s.comments, s.topic from ".$prefix."_stories s, ".$prefix."_authors a where";

and all is ok now.

regards fondy
 
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Tue Feb 08, 2005 6:34 am Reply with quote

I'm glad. I looked at this briefly and was not able to see anything immediately Smile
 
View user's profile Send private message
fondy







PostPosted: Wed Feb 09, 2005 7:56 am Reply with quote

Hi Raven !

To correct the problem, I have to delete the spaces between the name in the aid field. 'John Hansen' have to be 'JohnHansen'

In phpmyadmin I use these sql statement:

UPDATE nuke_stories SET aid = 'JohnHansen' WHERE aid = 'John Hansen';

fondy
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©