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 8215203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:42:20+00:00 2026-06-07T11:42:20+00:00

In my Rails testing environment, I have a user_id that looks like 1234-567abc89 .

  • 0

In my Rails testing environment, I have a user_id that looks like 1234-567abc89. I’m getting inconsistent behaviour by querying this user in different tables. Most of the queries are working, but running one particular query fails:

ActiveRecord::StatementInvalid (Mysql::Error: Unknown column '1234' in 
'where clause': SELECT * FROM `point_allocations` WHERE (user_id = 1234-567abc89) ):

So for some reason, everything beyond the hyphen is getting cut off. I realized that for the queries that work, it is looking up user 1234 instead of 1234-567abc89, but if all the others work, any idea why only this one would return an error?

  • 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-06-07T11:42:21+00:00Added an answer on June 7, 2026 at 11:42 am

    You need to include quotations.

    SELECT * FROM `point_allocations` WHERE (user_id = '1234-567abc89')
    

    Because the user_id column expects character-typed data, it will take your value (1234-567abc89) and parse it as an integer, truncating the content after the hyphen. If you include it in quotations, it will accept it as a string and transfer properly.

    Enjoy and good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting a 403 error on my new rails testing page: removed.com:8080. I installed
I am working on Ruby on Rails rspec testing and I have a question.
I have a custom error pages in my rails app testing the 404 error
I ran into this issue while testing a rails app deployed to two different
I am testing a piece of Rails code that reads: sleep(10.0) In my RSpec
I have recently started using RSpec for Integration testing in my Rails application, to
After successfully testing my alpha Rails 3 app in my local dev environment, I
I have a rails app that references the TMY3 meteorological dataset , which is
Currently I have a Rails 2.3 app that is a CMS serving over 100
I have a Rails 3 gem which has some rake tasks that should only

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.