In the same manner as previus post http://drupal.org/node/211085 for version 5.x-1.6-1 i take the same error when the search string begin with b character LOWERCASE. The error returned with "blog" as search string is :

user warning: 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 'node'log%'))' at line 1 query: SELECT count(node.nid) FROM node node LEFT JOIN term_node term_node ON node.nid = term_node.nid LEFT JOIN term_hierarchy term_hierarchy ON term_node.tid = term_hierarchy.tid LEFT JOIN content_type_nodeprofile node_data_field_cognome ON node.vid = node_data_field_cognome.vid WHERE (node.status = '1') AND (term_node.tid IN ('43')) AND (UPPER(node_data_field_cognome.field_cognome_value) LIKE UPPER(''node'log%')) in /websites/arsodhcp/drupal57ita/includes/database.mysql.inc on line 172.

The same search string starting with B UPPERCASE works fine.

Some other errors are with string starting with characters d, f and s in the lowercase form.
For example the search string "same" does not return any entries, but "Same" return result.

Comments

arso’s picture

Temporary fixed forcing uppercase conversion of argument using strtoupper in ./views.module.

Probably the error is not in the CCK module but in the views module.

function views_handler_filter_like($op, $filter, $filterinfo, &$query) {
/*watchdog('debug filter', print_r($filter['value'], TRUE), WATCHDOG_NOTICE, NULL); */
switch (trim($filter['value'])) {
case (''):
return;
break;
}
switch ($op) {
case 'handler':
$table = $filterinfo['table'];
$column = $filterinfo['field'];
$field = "$table.$column";
$query->ensure_table($table);

switch ($filter['operator']) {
case 'contains':
$query->add_where("UPPER(%s) LIKE UPPER('%%%s%%')",
$field, strtoupper($filter['value']));

karens’s picture

Status: Active » Fixed

This sounds like a Views error that has since been fixed, but the fix is not in the latest official Views release. You need the -dev version of Views.

xjm’s picture

KarenS,

Can you clarify where to get the latest dev build of Views for Drupal 5? There do not seem to be any "development snapshots" available for Views on the Views project page.

Thanks for any assistance you can provide.

karens’s picture

Look under 'View all Releases' and scroll down, there are lots of them. You're looking for the one called views 5.x-1.x-dev.

xjm’s picture

Thanks. I misread the dev version on that page as being dated December 3, 2006 (when it was first posted) rather than May 10, 2008. I will try installing the dev version and see if it helps with my issue.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

DJL’s picture

I am having the same problem
have looked as suggested in #4 but
I can not find a dev version release for 5.x later than the one I am using
- views 5.x-1.6 updated July 14, 2007 - 22:20

yched’s picture

A 'dev release' contains the current state of the code in CVS.
It's precisely not a 'numbered release'. which contains a frozen snapshot of the code at a given date.
The one you need is http://drupal.org/node/101135

It's listed on the 'all releases' page for views, but, well, there are a lot of things in that page, so you probably missed it.

DJL’s picture

A 'dev release' contains the current state of the code in CVS.
It's precisely not a 'numbered release'. which contains a frozen snapshot of the code at a given date.

If it had been above the latest official 5.x release I would have spotted it (honest!)
Many thanks for the prompt reply and the link!

matt@antinomia’s picture

Chiming in here to confirm that the May 10, 2008 -dev release fixes this issue for me. Thanks all!