will do. thanks a million

On May 24, 1:36 pm, Pat Allan <[email protected]> wrote:
> Hi Mauro
>
> Unfortunately, the :conditions argument isn't quite that flexible in  
> Sphinx - it doesn't support arrays, nor SQL syntax. It only takes a  
> hash, with the keys being the field name, and the values what word  
> you're looking for.
>
> However, it doesn't mean that what you're trying to do isn't possible.  
> Try the following:
> * Add accout_status as an attribute (not a field) if you haven't already
> * Stop Sphinx, reindex, and start Sphinx up again
> * Raider.search params[:search], :without => {:account_status => 0}
>
> Cheers
>
> --
> Pat
>
> On 24/05/2009, at 4:35 AM, ginko wrote:
>
>
>
> > I have a int field in my database and would like to check if it's not
> > 0. Apparently the != in the condition is not working. I'm I doing
> > something wrong? I tried different ways with no luck. Can anyone help?
>
> > these are the options I tried
>
> > @allRaiders = Raider.search params[:search], :conditions =>
> > ["account_status != 0"]
>
> > @allRaiders = Raider.search params[:search], :conditions =>
> > ["account_status != ?", 0]
>
> > @allRaiders = Raider.search params[:search], :conditions =>
> > ["account_status IS NOT ?", 0]
>
> > @allRaiders = Raider.search params[:search], :conditions =>
> > ["account_status < ?", 1]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to