WeBid Bug Tracking

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000353WeBidAuctionspublic2011-11-27 13:252012-12-12 16:04
Reporternay27uk 
Assigned To 
PrioritynoneSeverityminorReproducibilityhave not tried
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version1.0.3 
Target VersionFixed in Version1.0.4 
Summary0000353: An unexpected error occurred. WHEN PERFORMING A SEARCH
DescriptionOk this is a bug I dont seem to be able to find a solution to when a user performs a search on site and selects a category from the dropdown we get on the user side
 
Someone wrote


An unexpected error occurred. The error has been forwarded to our technical team and will be fixed shortly

 
In the admin error log we have the following
 
Someone wrote

27-11-2011, 13:16:58:: Database access error. Please contact the site administrator. SELECT * FROM webid_auctions WHERE
(title LIKE '%test%' OR id = 0)
AND (category IN (2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28) OR secondcat IN (2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28)
AND closed = 0 AND suspended = 0 AND starts <= 1322399818 AND ends > 1322399818
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 4
page:/MyPath/MyHostingAccount/httpdocs/search.php line:71

 
It seems like the bellow code in search.php has a wrong " speachmark in it somwhere on line 4 I have tried everything I can think to resolve this I have taken out the " one by one but just get a blank page I have replaced the " with ' againe a blank page.
 
I think this is one for a real coder to resolve
 
The code causing the error is this
[PHP] $query = "SELECT * FROM " . $DBPrefix . "auctions WHERE
   (title LIKE '%" . $term . "%' OR id = " . intval($term) . ")
   " . $catSQL . "
   AND closed = 0 AND suspended = 0 AND starts <= " . $NOW . " AND ends > " . $NOW;[/PHP]
 
and here is the link to the original thread
 
http://www.webidsupport.com/forums/showthread.php?4463-Search-Errors[/URL] [^]
 
NOTE: this only happens when the user selects a category to search in, if no category is selected search works with no error
TagsNo tags attached.
import_id355
Thread
Attached Files

- Relationships

-  Notes
(0000907)
shohel (reporter)
2012-01-29 03:29
edited on: 1970-01-01 00:00

Open the serach.php and replace the line 51 with this line
[PHP]$catSQL = " AND (category IN " . $catalist . ")"; [/PHP]
 it should be ok
(0000908)
nay27uk (reporter)
2012-01-29 13:04
edited on: 1970-01-01 00:00

Thanks shohel.
 
This should help renlok for next release.
 
Good work
(0000909)
shohel (reporter)
2012-01-30 04:10
edited on: 1970-01-01 00:00

nay27uk wrote

Thanks shohel.
 
This should help renlok for next release.
 
Good work

You are most welcome

- Issue History
Date Modified Username Field Change
2015-04-01 13:17 renlok New Issue
2015-04-01 13:17 renlok import_id => 355
2015-04-01 13:17 renlok Date Submitted 2015-04-01 13:17 => 2011-11-27 13:25
2015-04-01 13:17 renlok Last Update 2015-04-01 13:17 => 2012-12-12 16:04


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker