I'm still working on finding a solution to this problem and haven't yet come up with one. It appears this may be a bug in the query sub in db.cgi. This only happens with keyword searches. Someone else posted a problem with getting both "validated" and "unvalidated" records when doing a keyword search. Seems like a similar problem.
This is the piece of code from sub_query that has to do with keyword searching:
# If this is a keyword search, we want to set every field in the database to the
# search term.
if ($in{'keyword'}) {
$in{'ma'} = "on"; $bool = 'OR';
foreach $column (@db_cols) {
next if ($db_lengths{$column} > 255); # Can't search on TEXT/BLOB fields.
next if ($in{'keyword'} !~ /^\d+$/ and $db_is_int{$column});
push (@search_fields, $column); # Search every column
$in{$column} = $in{'keyword'}; # Fill %in with keyword we are looking for.
}
}
What can I modify to make it skip the UserID field when populating all fields with the keyword? There's no need to search on the UserID in my database because the user will only be able to search his/her own records. I don't mind losing the ability to do a keyword search on UserID as an administrator because, frankly, I can't think of a time I've ever needed to do that.
I'd appreciate a nudge in the right direction. Thanks!
Melanie
http://www.somemoorecats.com/ww/
http://www.okhima.org/
This is the piece of code from sub_query that has to do with keyword searching:
Code:
# If this is a keyword search, we want to set every field in the database to the
# search term.
if ($in{'keyword'}) {
$in{'ma'} = "on"; $bool = 'OR';
foreach $column (@db_cols) {
next if ($db_lengths{$column} > 255); # Can't search on TEXT/BLOB fields.
next if ($in{'keyword'} !~ /^\d+$/ and $db_is_int{$column});
push (@search_fields, $column); # Search every column
$in{$column} = $in{'keyword'}; # Fill %in with keyword we are looking for.
}
}
I'd appreciate a nudge in the right direction. Thanks!
Melanie
http://www.somemoorecats.com/ww/
http://www.okhima.org/