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

  • Home
  • SEARCH
  • 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 6733539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:46:52+00:00 2026-05-26T10:46:52+00:00

I have the following table: — — Table structure for table `DESTINATIONS` — CREATE

  • 0

I have the following table:

--
-- Table structure for table `DESTINATIONS`
--

CREATE TABLE IF NOT EXISTS `DESTINATIONS` (
  `DEST_ID` int(7) NOT NULL auto_increment,
  `COUNT_ID` int(6) NOT NULL,
  `REG_ID` int(6) NOT NULL,
  `CITY_ID` int(6) NOT NULL,
  `CREATE_DATE` datetime NOT NULL,
  `DESTINATION` varchar(256) NOT NULL,
  `APPROVED` tinyint(1) NOT NULL,
  PRIMARY KEY  (`DEST_ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=192 ;

--
-- Dumping data for table `DESTINATIONS`
--

INSERT INTO `DESTINATIONS` (`DEST_ID`, `COUNT_ID`, `REG_ID`, `CITY_ID`, `CREATE_DATE`, `DESTINATION`, `APPROVED`) 
VALUES (166, 9, 818, 0, '2011-10-27 15:24:20', 'Freeman\\''s Bay', 0);

And I am trying to run the following query:

SELECT * 
FROM  `DESTINATIONS` 
WHERE  `DESTINATION` LIKE  '%Freeman\'s Bay%'

which is returning 0 results. However, stripping the LIKE clause to anything BEFORE the quote mark will find and return a match.

Obviously, I’m doing something wrong, but I haven’t been able to figure out what exactly. Can I not perform a SELECT LIKE this? Have I escaped the quotes incorrectly? Any input is appreciated!

  • 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-26T10:46:52+00:00Added an answer on May 26, 2026 at 10:46 am

    The insert is escaped incorrectly. You are actually inserting the value Freeman\'s Bay, including the \. The select is okay.

    The select is escaped incorrectly. You are have inserting the value Freeman\'s Bay, but you’re looking for Freeman's Bay, excluding the \.

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

Sidebar

Related Questions

I have the following table structure CREATE TABLE `table` ( `id` int(11) NOT NULL
I have following table and data: create table Foo ( id int not null,
We have the following table: CREATE TABLE [dbo].[CampaignCustomer]( [ID] [int] IDENTITY(1,1) NOT NULL, [CampaignID]
I have the following table structures CREATE TABLE [dbo].[WorkItem]( [WorkItemId] [int] IDENTITY(1,1) NOT NULL,
I have following table CREATE TABLE User ( email sysname NOT NULL, sign varbinary(256)
I have following table structure: CREATE TABLE pilot_groups ( id INT PK, name VARCHAR(50),
I have the following table: CREATE TABLE posting ( id integer NOT NULL PRIMARY
I have the following table schema; CREATE TABLE `db1`.`sms_queue` ( `Id` INTEGER UNSIGNED NOT
I have the following table in MySQL (version 5): id int(10) UNSIGNED No auto_increment
I have the following table in SQL Server: CREATE TABLE [dbo].[Users]( [Id] [int] IDENTITY(1,1)

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.