Isn't that for when you want to go through all of the columns in the
database? I only wanted to look through the particular ones above...

On Nov 5, 6:01 pm, Alex Pilon <alex.pi...@gmail.com> wrote:
> You need to use wildcards
>
> On Nov 5, 2010 5:55 PM, "xpanshun" <srhen...@gmail.com> wrote:
>
> Hi everyone,
>
> I am trying to return any record from the database where a certain
> word (stored in variable $searchterm) is used (within a few different
> fields)...
>
> Here is what I have:
>
> $q = Doctrine_Query::create()
> ->from('Product p')
> ->where('p.product_id = ?', $search_term)
> ->orWhere('p.product_full_desc LIKE ?', $search_term)
> ->orWhere('p.product_partial_desc LIKE ?', $search_term)
> ->orWhere('p.product_type = ?', $search_term);
>
> $result_array_searchresults = $q->fetchArray();
>
> However the only field that I can get a return from is a one-word
> field like 'bracelet'. Fields like 'product_full_desc' or
> 'product_partial_desc' that contain strings/sentences won't return
> anything. I want the query to be able to read through these strings
> and pick out the search term.
>
> What is wrong with my query? How can I achieve the result I want?
>
> Thanks!
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com<symfony-users%2bunsubscr...@goog 
> legroups.com>
> For more options, visit this group 
> athttp://groups.google.com/group/symfony-users?hl=en

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to