Support Forums


Go Back   68 Classifieds Forums > Help & Support > v4 Questions & Support

Notices

 
LinkBack Thread Tools Display Modes
Old 04-06-2009, 03:53 PM   #1
Senior Member
 
bgordon's Avatar
 
Join Date: Aug 2006
Location: Georgian Bay, Ontario Canada
Posts: 172
Rep Power: 15
bgordon is on a distinguished road
Question Descrition Search Error

Whenever I populate the keyword field for a search (description) it get the following SQL errors showing up at the top of the page... Any ideas?

Quote:
Notice: Query failed: Column 'description' in where clause is ambiguous SQL: SELECT p.id, p.owner, p.title, p.featured, p.section, p.shortDescription, p.description, p.price, p.dateadded, p.expiration, p.display, p.pHighlighted, p.pBold, p.hitcount, p.url, u.username, u.state, u.city, u.country, u.extra, u.extra2, u.extra3, c.name FROM class_listings AS p LEFT JOIN class_users AS u ON p.owner = u.id LEFT JOIN class_categories AS c ON p.section = c.id WHERE 1=1 AND p.id IN (8,7,9,10,17,18,15,14,13,12,11,23,26,27,28,24,25,3 3,34,30,29,78,77,76,75,74,73,72,71,70,69,68,67,66, 65,64,63,62,84,85,241,240,239,238,237,236,226,225, 224,223,222,221,220,219,218,217,216,215,214,213,21 2,211,210,209,208,207,206,205,204,203,202,201,200, 199,198,197,196,195,194,193,192,191,190,189,188,18 7,186,185,184,183,182,181,180,179,178,177,176,175, 242,243,244,245,246,247,248,249,250,251,252,253,26 3,412,411,410,409,408,407,406,405,404,403,402,401, 400,399,398,397,396,395,394,393,392,391,390,389,38 8,387,386,385,384,383,382,381,380,379,378,377,376, 375, in /../includes/classes/database/mysql.php on line 140

Notice: Query failed: Column 'description' in where clause is ambiguous SQL: SELECT p.id, p.owner, p.title, p.featured, p.section, p.shortDescription, p.description, p.price, p.dateadded, p.expiration, p.display, p.pHighlighted, p.pBold, p.hitcount, p.url, u.username, u.state, u.city, u.country, u.extra, u.extra2, u.extra3, c.name FROM class_listings AS p LEFT JOIN class_users AS u ON p.owner = u.id LEFT JOIN class_categories AS c ON p.section = c.id WHERE 1=1 AND p.id IN (8,7,9,10,17,18,15,14,13,12,11,23,26,27,28,24,25,3 3,34,30,29,78,77,76,75,74,73,72,71,70,69,68,67,66, 65,64,63,62,84,85,241,240,239,238,237,236,226,225, 224,223,222,221,220,219,218,217,216,215,214,213,21 2,211,210,209,208,207,206,205,204,203,202,201,200, 199,198,197,196,195,194,193,192,191,190,189,188,18 7,186,185,184,183,182,181,180,179,178,177,176,175, 242,243,244,245,246,247,248,249,250,251,252,253,26 3,412,411,410,409,408,407,406,405,404,403,402,401, 400,399,398,397,396,395,394,393,392,391,390,389,38 8,387,386,385,384,383,382,381,380,379,378,377,376, 375, in /../includes/classes/database/mysql.php on line 140

Last edited by bgordon; 04-06-2009 at 03:55 PM.
bgordon is offline   Reply With Quote
Old 04-06-2009, 03:58 PM   #2
Coder
 
Join Date: Mar 2006
Posts: 4,564
Rep Power: 111
Lhotch is just really niceLhotch is just really nice
Default

68C version? Template? Are you using a 3rd party search mod?
__________________
Larry.
Lhotch is offline   Reply With Quote
Old 04-06-2009, 04:14 PM   #3
68 Classifieds Staff
 
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,113
Rep Power: 118
Eric Barnes is a jewel in the rough
Default

Either a module is altering this query or you have custom changes. The class_categories AS c is not part of the original query that comes stock with the script.
__________________
Eric Barnes
68 Classifieds Developer
Please do not send me a private message asking for support. Instead use these open forums or our ticket system.

Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | 68 @ Twitter | My Modules
Eric Barnes is offline   Reply With Quote
Old 04-06-2009, 04:17 PM   #4
Senior Member
 
bgordon's Avatar
 
Join Date: Aug 2006
Location: Georgian Bay, Ontario Canada
Posts: 172
Rep Power: 15
bgordon is on a distinguished road
Default

Screwed up listings.php... don't have any change log for it, so it must have been misadventure... restored from the master copy and all is well... false alarm Thanks for the prompt replies though!

Last edited by bgordon; 04-06-2009 at 04:35 PM.
bgordon is offline   Reply With Quote
Old 04-06-2009, 04:38 PM   #5
Moderator
 
juven14's Avatar
 
Join Date: Mar 2006
Location: Texas
Posts: 2,217
Rep Power: 61
juven14 is a jewel in the rough
Default

This is correct, something is adding a join and the default class isn't coded to handle a join with another table that contains a discription, title, or id.

PHP Code:
$where .= " AND (id LIKE '%".$trimm."%' OR title LIKE '%".$trimm."%' OR description LIKE '%".$trimm."%')"
I can't think of any of our products that alter the query in this manner, if you create a support ticket in our ticket system I can try and track down the cause of the issue for you. https://www.templatecodes.com/support
__________________
John Snyder
PHP Developer
juven14 is offline   Reply With Quote
Old 04-06-2009, 06:21 PM   #6
Senior Member
 
bgordon's Avatar
 
Join Date: Aug 2006
Location: Georgian Bay, Ontario Canada
Posts: 172
Rep Power: 15
bgordon is on a distinguished road
Question

Quote:
Originally Posted by Eric Barnes View Post
Either a module is altering this query or you have custom changes. The class_categories AS c is not part of the original query that comes stock with the script.
I know what it was now...

Somewhere on the forums, there was a code snipped that you guys provided to allow the 'category' and some extra fields to be showable in the view listings...

I recall putting that snippet in my listings.php now and never noticed that it broke the keyword search.

That being said, I will try to find that posting again, but I wonder if you could provide some compatible code to make that available again... I have some logic in my showlistings template that conditionally shows the category and a small graphic if one of my extra fields contains a certain value.

Pretty sure this is all standard in 4.10 (I am 4.09) so maybe this would be the time to upgrade...

Your thoughts on this?
bgordon is offline   Reply With Quote

Bookmarks

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Search Error Massage newcastledirectory v4 Questions & Support 12 06-06-2008 08:08 AM
Search Error gofir v3.1 Questions & Support 15 01-07-2008 08:36 PM
Search Error Maffo v3.1 Questions & Support 14 12-10-2007 04:39 PM
Search Page Error Maffo v3.1 Questions & Support 10 11-17-2006 04:20 PM
Error on Search Page sporthorsebreeder v3.1 Questions & Support 1 05-29-2006 07:23 PM


All times are GMT -4. The time now is 11:07 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0