By Goose4all on
Hi,
i get a strange error when i perform i search on my site...
user warning: Operand should contain 1 column(s) query: CREATE TEMPORARY TABLE temp_search_results SELECT i.type, i.sid, 5 * (3,67510216194 * i.relevance) + 5 * POW(2, (GREATEST(n.created, n.changed, c.last_comment_timestamp) - 1181153371) * 6.43e-8) + 5 * (2.0 - 2.0 / (1.0 + c.comment_count * 0,5)) + 5 * (2.0 - 2.0 / (1.0 + nc.totalcount * 0,0322580645161)) AS score FROM temp_search_sids i INNER JOIN main_search_dataset d ON i.sid = d.sid AND i.type = d.type INNER JOIN main_node n ON n.nid = i.sid LEFT JOIN main_node_comment_statistics c ON c.nid = i.sid LEFT JOIN main_node_counter nc ON nc.nid = i.sid WHERE (d.data LIKE '% error %') ORDER BY score DESC in /var/www/localhost/htdocs/markettalk/includes/database.mysql.inc on line 172.
user warning: Table 'markettalk.temp_search_results' doesn't exist query: SELECT COUNT(*) FROM temp_search_results in /var/www/localhost/htdocs/markettalk/includes/database.mysql.inc on line 172. http://charts.market-talk.de/image/207.jpeg
anyone who knows how to fix this? i have no idea...
thanks
Andreas
Comments
...
Have you noticed that you have "," instead of "." in some floats?
(sorry; I don't have time right now to check this problem further.)
hi, thanks for the
hi,
thanks for the response...
thing is, i did not do any changes.. only switched language to german... (?)
thanks
Andreas
...
Yeah, that's the problem.
I checked the problem further.
If I understand http://php.net/types.string correctly, even implicit casting from float to string takes into account the locale. So even code such as
"before ". 3.14 ."after"would producebefore 3,14 after. MySQL doesn't like this notation. Hmmmm....I don't see an elegant solution. I could give you a quick hack, it's easy, but I tend to believe the drupal developers, some of them european, had already taken this into consideration... somehow.
Have you tried to search for a solution? (try keywords such as 'comma, mysql, sql, german, locale', 'operand should contain').
thanks again.. did not
thanks again..
did not search that specific.. but i will and will post anything i found..
so, even with english its a nogo, btw.. thats really strange..
anyway, i will do a deep search and maybe there is something..
thank you
Andreas
well... i couldnt find
well...
i couldnt find anything on that..
well, that would be awesome!
thanks alot!
Andreas
I have the same problem,
I have the same problem, what to do?
i needed to reinstall...
i needed to reinstall... thank god i had a test-install - so it didnt hurt..
i have no clue what the problem was.. sorry
cheers
andreas
I have the same problem
I have the same problem here, and i cannot reinstall my drupal, there too data do migrate ! Can somone help me to find an asnwer ?
It looks REALLY, REALLY
It looks REALLY, REALLY strange ! It seems that it depend on langage. When I go back in English langage, the search is working fine !
In France, we put "," instead of "." in order to seperate decimal. Is it the problem ?
I think, it need a patch... I'm investing.
...
see http://drupal.org/node/193214
(this bug probably won't be easy to fix because the simplest solution (sprintf()) is for PHP 4.3.10 and up while Drupal's supposed work with PHP 4.3.3)
I've solved the problem,
I've solved the problem, following this solution: http://drupal.org/node/193214#comment-661371
"do some setlocale changes in function do_search() in search.module"
Now the search is working without the problems.
This is my scenario: I have two languages in my site. When i do the search in English, works fine. But if i do the search in Portuguese, i was having an error like this:
user warning: Operand should contain 1 column(s) query: CREATE TEMPORARY TABLE temp_search_results SELECT i.type, i.sid, 5 * (3,3219279368523 * i.relevance) + 5 * POW(2, (GREATEST(n.created, n.changed, c.last_comment_timestamp) - 1199407504) * 6.43e-8) + 5 * (2.0 - 2.0 / (1.0 + c.comment_count * 1)) AS score FROM temp_search_sids i INNER JOIN search_dataset d ON i.sid = d.sid AND i.type = d.type INNER JOIN node n ON n.nid = i.sid LEFT JOIN node_comment_statistics c ON c.nid = i.sid WHERE (d.data LIKE '% vodka %') ORDER BY score DESC in /var/www/html/drupal1/includes/database.mysql.inc on line 172.
user warning: Table 'drupaltest.temp_search_results' doesn't exist query: SELECT COUNT(*) FROM temp_search_results in /var/www/html/drupal1/includes/database.mysql.inc on line 172.
My Drupal version is 5.5