Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4242458
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:26:41+00:00 2026-05-21T03:26:41+00:00

This doesn’t seem to be working : @zip = %w[07005, 07034, 07035] CardSignup.find(:all, :conditions

  • 0

This doesn’t seem to be working :

@zip = %w[07005, 07034, 07035]

CardSignup.find(:all, :conditions => ["zip_code IN (?)", @zip])

=> [ ]

However, if I do a simple find_by with the second zip code, it returns a result :

CardSignup.find_by_zip_code("07034")

=> Object<x01231 ..

What am I doing wrong ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T03:26:42+00:00Added an answer on May 21, 2026 at 3:26 am

    Your implementation of the array is incorrect. The way you have it at the moment the commas are part of each array object:

    >> %w[07005, 07034, 07035]
    => ["07005,", "07034,", "07035"]
    

    You should implement this with the commas removed:

    >> %w{07005 07034 07035}
    => ["07005", "07034", "07035"]
    

    or:

    >> [07005, 07034, 07035]
    => [07005, 07034, 07035]
    

    So the full implementation is:

    @zip = %w{07005 07034 07035}
    
    CardSignup.find(:all, :conditions => ["zip_code IN (?)", @zip])
    
    => [Object<x01231 ..
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This doesn't seem to be working right now. I'm using Faye with NodeJS behind
This doesn't seem to be working: <select id=mySel onchange=alert('foo')> <option value=a>a</option> <option value=b>b</option> </select>
This doesn't seem to be causing an issue as yet, but it's something I
This doesn't happen all the time. A bug is not a bug if cannot
This doesn't seem to work as I intend. VB.NET: Dim x = Model.Discussions.OrderByDescending(Function(d) d.Messages.OrderByDescending(Function(m)
This doesn't seem to be possible? So what is the best work-around? Expando /
This doesn't seem to work: NSString *string = [[NSString alloc] init]; string = @%@M,
This doesn't seem to work in django 1.1 (I believe this will require a
This doesn't seem to happen automatically when using a text area , but does
This doesn't seem to make my combobox display the friendlier names. I'm not sure

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.