68 Classifieds Forums
Go Back   68 Classifieds Forums > v3.1.x Help & Support > v3.1 Questions & Support > Advance search
v3.1 Questions & Support Help and support for 68 Classifieds v3.1.x

 
Thread Tools Display Modes
(#1)
Old
CHRD CHRD is offline
Member
CHRD is on a distinguished road
 
Posts: 54
Join Date: Nov 2006
Default Advance search - 03-01-2007, 06:40 AM

Problem with my search extra fields

when I use advance search and only select one category then only select the extra field called golf, nothing comes up.

When I type in golf on the text search box and don't select the golf extra field only a few come up.

When I put golf in the text search box and select the golf extra field nothing comes up.

All my extra fields have been in place before these ads were listed


Costa del Sol
Spain
v3.1.4b Developer
�Powerful you have become, the dark side I sense in you.�
Reply With Quote
(#2)
Old
suzkaw suzkaw is offline
Help you, I will.
suzkaw has a spectacular aura about
 
Posts: 1,814
Join Date: Mar 2006
Location: Belmont, NC
Default 03-01-2007, 08:46 AM

Since you have the developer edition can you try this.

Open the searchresults.php file and locate this line:
PHP Code:
$resultSet = $db->query($sSQL);
Change it to:
PHP Code:
echo $sSQL;
$resultSet = $db->query($sSQL);

Then do the same search as you described and the sql statement will printed at the top of the page. Next copy and paste that into a reply here.


--
Thanks,
Eric Barnes
68 Classifieds
Documentation - Modifications - My Blog

Reply With Quote
(#3)
Old
CHRD CHRD is offline
Member
CHRD is on a distinguished road
 
Posts: 54
Join Date: Nov 2006
Default 03-05-2007, 05:50 AM

this is result from just extra field selection:
SELECT p.id, p.owner, p.title, p.featured, p.section, p.shortDescription, p.display, p.description, p.price, p.dateadded, p.expiration, p.pBold, p.pHighlighted, u.state, u.city, u.country,u.phone FROM class_holidaysproducts AS p INNER JOIN class_holidaysproducts_fields ON p.id = class_holidaysproducts_fields.pID AND ( sValue LIKE '%Golf%') LEFT JOIN class_holidaysusers AS u ON p.owner = u.id WHERE p.expiration > NOW() AND p.display = 'Y' AND p.section IN (17, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188) AND p.price BETWEEN 0 AND 9999999 GROUP BY p.id, p.owner, p.title, p.featured, p.section, p.description, p.dateadded, p.expiration, u.state, u.city, u.country HAVING count(sValue) = 1 ORDER BY featured DESC, p.dateadded DESC

results from just text search:
SELECT p.id, p.owner, p.title, p.featured, p.section, p.shortDescription, p.display, p.description, p.price, p.dateadded, p.expiration, p.pBold, p.pHighlighted, u.state, u.city, u.country,u.phone FROM class_holidaysproducts AS p LEFT JOIN class_holidaysusers AS u ON p.owner = u.id WHERE p.expiration > NOW() AND p.display = 'Y' AND p.section IN (17, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188) AND (p.title LIKE '%golf%' OR p.shortDescription LIKE '%golf%' OR p.description LIKE '%golf%') AND p.price BETWEEN 0 AND 9999999 GROUP BY p.id, p.owner, p.title, p.featured, p.section, p.description, p.dateadded, p.expiration, u.state, u.city, u.country ORDER BY featured DESC, p.dateadded DESC


result from extra field selection and text search:
SELECT p.id, p.owner, p.title, p.featured, p.section, p.shortDescription, p.display, p.description, p.price, p.dateadded, p.expiration, p.pBold, p.pHighlighted, u.state, u.city, u.country,u.phone FROM class_holidaysproducts AS p INNER JOIN class_holidaysproducts_fields ON p.id = class_holidaysproducts_fields.pID AND ( sValue LIKE '%Golf%') LEFT JOIN class_holidaysusers AS u ON p.owner = u.id WHERE p.expiration > NOW() AND p.display = 'Y' AND p.section IN (17, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188) AND (p.title LIKE '%golf%' OR p.shortDescription LIKE '%golf%' OR p.description LIKE '%golf%') AND p.price BETWEEN 0 AND 9999999 GROUP BY p.id, p.owner, p.title, p.featured, p.section, p.description, p.dateadded, p.expiration, u.state, u.city, u.country HAVING count(sValue) = 1 ORDER BY featured DESC, p.dateadded DESC


Costa del Sol
Spain
v3.1.4b Developer
�Powerful you have become, the dark side I sense in you.�
Reply With Quote
(#4)
Old
suzkaw suzkaw is offline
Help you, I will.
suzkaw has a spectacular aura about
 
Posts: 1,814
Join Date: Mar 2006
Location: Belmont, NC
Default 03-05-2007, 09:45 AM

I just ran a few tests and it seems to be working for me.

First I did a normal search by selecting the "Portugal" category then choosing golf. Which returned 2 listings. Next I manually entered the golf option like this:
searchresults.php?searchtext=&opt12=Golf

Which returned three pages of results.


--
Thanks,
Eric Barnes
68 Classifieds
Documentation - Modifications - My Blog

Reply With Quote
(#5)
Old
CHRD CHRD is offline
Member
CHRD is on a distinguished road
 
Posts: 54
Join Date: Nov 2006
Default 03-05-2007, 11:08 AM

I dont think its working like it should,

when you select portugal and use text search golf and select extra field golf I get no results.

when I search portugal and only text search golf you get 7 results

and when I search portugal and only use extra field golf only 2 results show

but the results from the text search golf dont show the golf extra field search result, even thoe all of the results have the golf extra field selected


Costa del Sol
Spain
v3.1.4b Developer
�Powerful you have become, the dark side I sense in you.�
Reply With Quote
(#6)
Old
suzkaw suzkaw is offline
Help you, I will.
suzkaw has a spectacular aura about
 
Posts: 1,814
Join Date: Mar 2006
Location: Belmont, NC
Default 03-05-2007, 12:56 PM

When you enter text to search for it does not search the extra fields. It only searches the title, short description, and description.


--
Thanks,
Eric Barnes
68 Classifieds
Documentation - Modifications - My Blog

Reply With Quote
(#7)
Old
CHRD CHRD is offline
Member
CHRD is on a distinguished road
 
Posts: 54
Join Date: Nov 2006
Default 03-05-2007, 01:15 PM

So whats the point of having extra field search option, if when text search is used, all extra field options are ignored.


Costa del Sol
Spain
v3.1.4b Developer
�Powerful you have become, the dark side I sense in you.�
Reply With Quote
(#8)
Old
suzkaw suzkaw is offline
Help you, I will.
suzkaw has a spectacular aura about
 
Posts: 1,814
Join Date: Mar 2006
Location: Belmont, NC
Default 03-05-2007, 01:32 PM

No that is not the case. Let me try and explain a little better.

If you enter text to search it only searches the following rows title, short description, and description

If you select an option then it will search the options table.

If you enter text and select an option then both the options table and the fields above are searched.

I hope this makes sense.


--
Thanks,
Eric Barnes
68 Classifieds
Documentation - Modifications - My Blog

Reply With Quote
(#9)
Old
CHRD CHRD is offline
Member
CHRD is on a distinguished road
 
Posts: 54
Join Date: Nov 2006
Default 03-06-2007, 09:20 AM

OK but why do I get no results if I text search golf rental, select cat portugal and select extra field golf,

all properties that have the golf extra field selected under portugal should show up with that search?


Costa del Sol
Spain
v3.1.4b Developer
�Powerful you have become, the dark side I sense in you.�
Reply With Quote
(#10)
Old
suzkaw suzkaw is offline
Help you, I will.
suzkaw has a spectacular aura about
 
Posts: 1,814
Join Date: Mar 2006
Location: Belmont, NC
Default 03-06-2007, 09:26 AM

If I search for Portugal and select golf as the option then two listings come up. Neither of these include golf in the title, short description, or description. So they will not appear when searching for the text "golf". Since you entered the text golf and the option golf nothing appears because there are no matches for both search types.


--
Thanks,
Eric Barnes
68 Classifieds
Documentation - Modifications - My Blog

Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
city drop down won't search NetGirl v3.1 Questions & Support 7 12-10-2006 11:15 PM
Search in Navigation bar marketingsolutions v3.1 Questions & Support 0 11-02-2006 12:10 PM
Aligning the "zip code," etc. search fields spaceboy v3.1 Modifications 5 09-09-2006 02:27 PM
Drop Down Search Issue CB v3.1 Questions & Support 2 06-23-2006 12:04 AM
Advanced Search Template sporthorsebreeder Template Design Questions 6 04-05-2006 04:25 PM



Powered by vBulletin® Version 3.6.3
Copyright ©2000 - 2007, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com