4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
June 22, 2018, 11:11:37 PM

Login with username, password and session length
Search:     Advanced search
Togle to toolbar
Translate this page with =>
Translate this page >
* Home Help Search Login Register
 
+  4images Forum & Community
|-+  4images Help / Hilfe
| |-+  Bug Fixes & Patches
| | |-+  [1.7.9] DB Error: Bad SQL Query: INSERT INTO 4images_wordmatch (image_id, ...
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: [1.7.9] DB Error: Bad SQL Query: INSERT INTO 4images_wordmatch (image_id, ...  (Read 16094 times)
kai
Administrator
Addicted member
*****
Offline Offline

Posts: 1405

Thank You
-Given: 66
-Receive: 199


View Profile WWW
« on: December 03, 2010, 09:29:46 AM »

If you upload an image which has the same words in title, description and keywords you can get a "DB Error: Bad SQL Query: INSERT INTO 4images_wordmatch (image_id, ..." message.

To fix this:

in includes/search_utils.php

FIND:
1
array_walk($split_words'trim_value');

and REPLACE WITH:
1
2
3
4
$split_words array_map('trim'$split_words);
$split_words array_map('strip_tags'$split_words);
$split_words array_map('convert_special'$split_words);
$split_words array_map('strtolower'$split_words);
« Last Edit: December 10, 2010, 01:15:29 AM by V@no » Logged


Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search
mawenzi
4images Moderator
4images Guru
*****
Offline Offline

Posts: 4500

Thank You
-Given: 36
-Receive: 121


View Profile
« Reply #1 on: December 09, 2010, 10:22:41 PM »

@ Kai ...
... thanks for this fix ...

@ all ...
... only a hint : the file search_utils.php is to find in /includes/ ...

Logged

Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...
haider512
Full Member
***
Offline Offline

Posts: 153

Thank You
-Given: 57
-Receive: 2


View Profile
« Reply #2 on: December 27, 2010, 11:56:43 PM »

Many Thanks...Keep rocking....
Logged
ivan
4images Moderator
4images Guru
*****
Offline Offline

Posts: 2279

Thank You
-Given: 4
-Receive: 31


View Profile WWW
« Reply #3 on: January 06, 2011, 08:15:25 AM »

Caution!

Fix is integrated in following post
http://www.4homepages.de/forum/index.php?topic=28860.0;topicseen
Logged

greetings / grüsse
ivan

Facebook Fan Page | Follow Twitter

Blog: Reisen Blog
Bilder Gallery: Bilder Gallery
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.048 seconds with 19 queries.