Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4257
Latest: Alex998.
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 43295
Total Topics: 7523
Most Online Today: 159
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 145
Total: 145

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

+- Recent Topics

Please Help! by SMFHacks
April 17, 2024, 08:04:55 am

Rate own images by fvlog19
April 11, 2024, 10:56:53 am

Tidy Child Boards on 2.1.4 by SMFHacks
April 04, 2024, 03:54:12 pm

Problems SMF 2.0.19 > 2.1.4 SMF Gallery Pro - Recents Images to overall header by Michel68
March 30, 2024, 12:41:08 pm

Can't DROP 'id_member'; check that column/key exists Datei: by SMFHacks
March 30, 2024, 11:58:20 am

No thumbnails on new uploads by Tonyvic
March 29, 2024, 06:26:18 am

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

Powered by EzPortal