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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T22:37:25+00:00 2026-05-19T22:37:25+00:00

I have the following value in my table: When I Don\’t Know What To

  • 0

I have the following value in my table:

When I Don\’t Know What To Do

Notice the apostrophe is already escaped. Now I want to select this value from this table using the following SQL string:

SELECT * FROM wp_wpsc_productmeta WHERE meta_value = ‘When I Don\’t Know What To Do’

I am getting 0 rows returned. When I change the SQL string to this:

SELECT * FROM wp_wpsc_productmeta WHERE meta_value LIKE ‘When I Don%’

I get my result set correctly. So, my question is, how do I write the SQL string so that I can select a value from a table when that value has an already-escaped apostrophe in it?

Please do not answer that I should use parameters. I’d very much like to figure out the answer using the method that I’m trying. Thanks for your help!

  • 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-19T22:37:25+00:00Added an answer on May 19, 2026 at 10:37 pm

    What language are you using? I think the language is probably interpreting the escape backslash as an escape for its benefit, so you may need to do it twice to ensure the database sees it too:

    'I don\\\'t know';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following query in VBA: DoCmd.RunSQL INSERT INTO table (value) VALUES ('example')
Assume I have the following style table, col1 col2 and col3 have same value
I have an entity mapped as following: @Entity @Table(name = Groups) @IdClass(value = GroupId.class)
I have the following query: INSERT INTO table (a, b, c) VALUES (NOW(), NOW()
I have following table it shows like this: ABC A B C 123 Hello
I have the following html: <style type=text/css> .message-view-value-td { vertical-align:bottom; } </style> <table width=600>
I have a table that contains the following: DataDate Value 2010-03-01 08:31:32.000 100 2010-03-01
I have a sqlite table that has amount field with NUMERIC(10,5) value(I know data
I have a table, with the following columns: PK1 PK2 ID DATE Value flag
Let's say I have the following database table: record_id | record_date | record_value -----------+-------------+--------------

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.