String search

Author Message

Sao Tavi

Thursday 14 April 2011 4:59:09 am

I have an extension that uses a custom table. I want to be able to search in that table for row that have column matching a string. I've read about fetch functions and eZ Find but I couldn't find what I was looking for, so I have several questions:

1)
eZ Find supports custom tables? Is there a resource that can explain this in more detail? I've read the tutorials on ez publish, but there was nothing of this kind...

2)
How can I use a Fetch function to search for a string using wildcard, make case insensivite search? I am using the function below, but it returns only exact matches.

public static function fetchByField1Field2( $field1 , $field2, $asObject = true)
    { 
        $result = eZPersistentObject::fetchObjectList(  
                                                    self::definition(), 
                                                    null, 
                                                    array( 'colum1' => $field1, 
                                'column2' => $field2 ), 
                                null,
                                array('length', 5),
                                                    $asObject, 
                                                    false, 
                                                    null ); 
 
        return $result; 
    }

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.