Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 11803
Latest: VXP
New This Month: 2
New This Week: 0
New Today: 0
Stats
Total Posts: 41608
Total Topics: 7274
Most Online Today: 79
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 32
Total: 32

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

+- Recent Topics

Thanks mod SMF 2.1 by Monocero
November 27, 2021, 01:13:01 pm

How to change the font on a photo in SMF Gallery Pro? by SMFHacks
November 18, 2021, 09:28:11 am

Bulk Upload Many Pictures - File Name by SMFHacks
November 17, 2021, 08:58:50 am

Schedule or direct download link by SMFHacks
November 16, 2021, 10:57:33 am

Download Expire by Vincent Volmer
November 16, 2021, 02:40:47 am

prettyurls - TroubleShooting.wiki by SMFHacks
November 14, 2021, 02:18:59 pm

Error With Delete Download by mickjav
November 10, 2021, 04:49:12 pm

No ads on left or right by coyote
November 08, 2021, 04:57:13 pm

Now accepting Cryptocurrency by SMFHacks
November 05, 2021, 05:33:27 pm

Latest Version Pretty Urls SEO Pro by SMFHacks
November 04, 2021, 03:46:53 pm

Powered by EzPortal