Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4200
Latest: [chrisB]
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 42622
Total Topics: 7434
Most Online Today: 196
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 1
Guests: 89
Total: 90

Author Topic: Database error when searching  (Read 8689 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: 16164
    • 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: 16164
    • 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: 16164
    • 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: 16164
    • 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
9931 Views
Last post February 09, 2008, 11:44:03 pm
by ApplianceJunk
2 Replies
3567 Views
Last post July 05, 2008, 10:57:15 pm
by musicman8oh8
2 Replies
6103 Views
Last post October 28, 2008, 03:37:48 am
by clive
0 Replies
2038 Views
Last post January 17, 2011, 12:19:31 pm
by redpotato
4 Replies
4728 Views
Last post October 09, 2011, 03:59:37 pm
by SMFHacks

+- Recent Topics

SMF 2.1 Final Released by [chrisB]
December 05, 2022, 11:56:13 am

Errors with SMF2WPBridge by SMFHacks
December 04, 2022, 11:28:57 am

List of changes in SMFGallery by Monocero
December 02, 2022, 06:23:53 am

Permissions query by davejo
November 30, 2022, 09:52:38 am

"Notify all store admins of item purchase" Not Working in SMF 2.1.2 or 2.1.3 by SMFHacks
November 29, 2022, 01:15:50 pm

Undefined index: id by Shades
November 29, 2022, 12:15:20 pm

Additional Recommendations for SMF Store by Michael Vail
November 26, 2022, 12:49:58 pm

SMF Store 5.0 Beta Errors - Trying to access array offset on value of type null by Michael Vail
November 26, 2022, 12:07:42 pm

Modification: Subcategories total in main gallery view by VisiGod
November 26, 2022, 11:27:34 am

Change log for Downloads Pro 6.13 and 6.14 by Nicole
November 20, 2022, 08:24:34 am

Powered by EzPortal