Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 11845
Latest: SamoanOnion
New This Month: 6
New This Week: 0
New Today: 0
Stats
Total Posts: 42473
Total Topics: 7406
Most Online Today: 80
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 43
Total: 43

Author Topic: Database error when searching  (Read 8666 times)

0 Members and 1 Guest are viewing this topic.

Offline vkot

  • Full Member
  • ***
  • Posts: 136
    • View Profile
Database error when searching
« on: April 16, 2008, 02:09:03 am »
I get this error when I make a search:
Quote
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 'i.ID_CAT = 5 AND AND (i.title LIKE '%Asama%' OR i.description LIKE '%Asama%')
' at line 10
File: /xxxxxx/xxxxxx/Sources/Load.php(1726) : eval()'d code
Line: 4113
(file path is hidden)

I guess there was a problem at line 1726 (4113 does not exist), which is the line with the "eval()" here:
Code: [Select]
// Are we going to use eval?
if (empty($modSettings['disableTemplateEval']))
{
$file_found = file_exists($filename) && eval('?' . '>' . rtrim(file_get_contents($filename))) !== false;
$settings['current_include_filename'] = $filename;
}

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16109
    • View Profile
Re: Database error when searching
« Reply #1 on: April 16, 2008, 08:57:34 pm »
What were searching for and what options did you select when you did a search?
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline vkot

  • Full Member
  • ***
  • Posts: 136
    • View Profile
Re: Database error when searching
« Reply #2 on: April 19, 2008, 02:45:55 am »
Now it works! Without me changing anything...

Offline vkot

  • Full Member
  • ***
  • Posts: 136
    • View Profile
Re: Database error when searching
« Reply #3 on: July 20, 2008, 10:54:05 am »
Well... I installed SMF Classifieds on another forum and it shows a similar error:

Quote
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 'AND (i.title LIKE '%asama%' OR i.description LIKE '%asama%')
ORDER BY i.ID_LI' at line 10
File: /xxxxxx/xxxxxx/Sources/Load.php(1733) : eval()'d code
Line: 5052
The SQL query string displayed is incomplete, and it changes if you change the search string! Only the 2nd line changes, it mays show ORDER BY i.ID_' at line 10 or ORDER BY i.ID_LISTING' at line 10, etc. This is weird...

And below that, SMF says:
Quote
<b>Note:</b> It appears that your database <em>may</em> require an upgrade. Your forum\'s files are currently at version ' . $forum_version . ', while your database is at version ' . $modSettings['smfVersion'] . '. The above error might possibly go away if you execute the latest version of upgrade.php

I don't know what I'm supposed to do and if there is any risk of destroying my database...

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16109
    • View Profile
Re: Database error when searching
« Reply #4 on: July 20, 2008, 02:19:38 pm »
Does it occur with the latest version of the classifieds?

If so what exactly are you searching for and what options did you select.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline vkot

  • Full Member
  • ***
  • Posts: 136
    • View Profile
Re: Database error when searching
« Reply #5 on: July 21, 2008, 06:24:26 am »
I have smf classifieds 1.2.2 and SMF 1.1.5
(In the classifieds admin page it says that I have 1.2.2 and that the latest version is 1.2.1. It seems that you missed something ;D)

That error is shown only to the admins.
To the users is shown a short message from SMF:
Quote
Database Error
Please try again.  If you come back to this error screen, report the error to an administrator.

It happens in every classifieds search, whatever the options.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16109
    • View Profile
Re: Database error when searching
« Reply #6 on: July 21, 2008, 10:55:51 pm »
1.2.3
!Fixed a couple of bugs with searching for listings.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline vkot

  • Full Member
  • ***
  • Posts: 136
    • View Profile
Re: Database error when searching
« Reply #7 on: July 24, 2008, 03:39:35 am »
Problem solved, with this fix. Thanks :)

Offline vkot

  • Full Member
  • ***
  • Posts: 136
    • View Profile
Re: Database error when searching
« Reply #8 on: September 11, 2008, 03:40:31 am »
I have noticed the same problem when searching, in the following conditions:

- When I choose a category to search in
- When I search ads from a certain member

The error is:
Code: [Select]
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 'AND (i.title LIKE '%guitar%' OR i.description LIKE '%guitar%')
ORDER BY i.ID' at line 10
Αρχείο: /xxx/xxx/xxx/public_html/forum/Sources/Load.php(1737) : eval()'d code
Line: 5201
(I have upgraded to SMF 1.1.6)

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16109
    • View Profile
Re: Database error when searching
« Reply #9 on: September 26, 2008, 09:34:57 pm »
I have noticed the same problem when searching, in the following conditions:

- When I choose a category to search in
- When I search ads from a certain member

The error is:
Code: [Select]
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 'AND (i.title LIKE '%guitar%' OR i.description LIKE '%guitar%')
ORDER BY i.ID' at line 10
Αρχείο: /xxx/xxx/xxx/public_html/forum/Sources/Load.php(1737) : eval()'d code
Line: 5201
(I have upgraded to SMF 1.1.6)
Fixed for Classifieds 1.2.10
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

 

Related Topics

  Subject / Started by Replies Last post
4 Replies
9893 Views
Last post February 09, 2008, 11:44:03 pm
by ApplianceJunk
2 Replies
3545 Views
Last post July 05, 2008, 10:57:15 pm
by musicman8oh8
2 Replies
6086 Views
Last post October 28, 2008, 03:37:48 am
by clive
0 Replies
2026 Views
Last post January 17, 2011, 12:19:31 pm
by redpotato
4 Replies
4693 Views
Last post October 09, 2011, 03:59:37 pm
by SMFHacks

+- Recent Topics

"Custom title" badge by Hatshepsut
September 27, 2022, 10:11:27 pm

Category Selection by Anmer
September 18, 2022, 02:40:06 am

Setting a single free download. by Zaphod
September 12, 2022, 10:18:45 pm

Error message "Data too long for column 'ipaddress' at row 1" by SMFHacks
September 12, 2022, 08:49:02 am

SMF to SMF bridge via WP by SMFHacks
September 11, 2022, 09:44:30 am

Video player included by SMFHacks
September 06, 2022, 10:26:27 pm

Upload hangs / doesn't complete by SMFHacks
August 28, 2022, 08:36:21 am

[Feature Request] Admin Sales Alert by Shades
August 25, 2022, 06:41:00 pm

Portal Block by SMFHacks
August 23, 2022, 12:42:22 pm

Question about undoing a rating by SMFHacks
August 22, 2022, 04:31:50 pm

Powered by EzPortal