Yes, it uses 1 and 0 instead.. change your query to this: @gameweek = Gameweek.find(:first, :conditions => [ "current = ? and league_id = ?",true, @league.id ])
On Feb 10, 2008 9:52 AM, Dave Amos <[EMAIL PROTECTED]> wrote: > > Okay, that made sense to me, and it worked! I've been inserting data > like crazy, thanks! > > I do have a bit of a follow up question, though. Does sqlite3 handle > booleans differently than MySQL? It seems to choke when I query based on > a boolean. For example: > > In my controller, I have this: > > @gameweek = Gameweek.find(:first, :conditions => [ "current = true and > league_id = ?", @league.id ]) > > In my production log, I get this error: > > ActiveRecord::StatementInvalid (SQLite3::SQLException: no such column: > true: SELECT * FROM gameweeks WHERE (current = true and league_id = 1) > LIMIT 1): > > I have a "current" column, so I don't see what the problem is... > > Thanks again! > -- > Posted via http://www.ruby-forum.com/. > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Deploying Rails" group. To post to this group, send email to rubyonrails-deployment@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-deployment?hl=en -~----------~----~----~----~------~----~------~--~---