Author Topic

steve walker

Tuesday 07 September 2004 1:05:48 am

Comment41352

Paul,

I seemed to have stumbled into an issue with the fetches. The fetch works fine if I search on a number, but if I put any text into the search fields I get sql errors.

Say I put in the letter 'F' I see:

Query error: Unknown column 'F' in 'where clause'. Query: SELECT ezcontentobject.*,
                           ezcontentobject_tree.*,
                           ezcontentclass.name as class_name
                           
                           , ezcontentobject_name.name as name,  ezcontentobject_name.real_translation 
                    FROM
                          ezcontentobject_tree,
                          ezcontentobject,ezcontentclass
                          , ezcontentobject_name 
                          
                          , ezcontentobject_attribute a0 , ezcontentobject_attribute a1 , ezcontentobject_attribute a2 
                          
                       WHERE
                           path_string like '/1/2/59/%' and 
                          
                          
                          
                               a0.contentobject_id = ezcontentobject.id AND
                               a0.contentclassattribute_id = 203 AND
                               a0.version = ezcontentobject_name.content_version AND
                               a0.language_code = ezcontentobject_name.real_translation AND 
                               a1.contentobject_id = ezcontentobject.id AND
                               a1.contentclassattribute_id = 210 AND
                               a1.version = ezcontentobject_name.content_version AND
                               a1.language_code = ezcontentobject_name.real_translation AND 
                               a2.contentobject_id = ezcontentobject.id AND
                               a2.contentclassattribute_id = 204 AND
                               a2.version = ezcontentobject_name.content_version AND
                               a2.language_code = ezcontentobject_name.real_translation AND 
                            ( a0.sort_key_string IN (1)  AND a1.sort_key_string IN (F)  AND a2.sort_key_string IN (dv)  ) AND 
                          ezcontentclass.version=0 AND
                          node_id != 59 AND
                          ezcontentobject_tree.contentobject_id = ezcontentobject.id  AND
                          ezcontentclass.id = ezcontentobject.contentclass_id AND
                          
                          
                          ezcontentobject_tree.contentobject_is_published = 1
                           and  ezcontentobject_tree.contentobject_id = ezcontentobject_name.contentobject_id and
                              ezcontentobject_tree.contentobject_version = ezcontentobject_name.content_version and
                              ezcontentobject_name.content_translation = 'eng-GB' 
                           AND ((ezcontentobject.section_id in (1))) 
                    
                    ORDER BY  path_string ASC
LIMIT 0, 3

Everything works fine if I stick with numerical fetches!?

Any ideas on what this might be?

Thanks, Steve.

http://www.oneworldmarket.co.uk