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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:35:14+00:00 2026-06-01T03:35:14+00:00

It is my first time setting up databases in MySQL and using them so

  • 0

It is my first time setting up databases in MySQL and using them so I would appreciate any help as my hours of searching online have not helped me with this error.

I basically have one tables in my DB.
Airport:
Title- 3 Char & PublicKey
AirportName- 100 Char & Not null

I have coded a webpage in php that should allow me to delete my entries depending on which one I select.

In short this is my php:

 $result = mysql_query("DELETE FROM airport WHERE Title=$Title")
 or die(mysql_error()); 

It gives me this error:

Unknown column 'ABC' in 'where clause'

If I run this in phpmyadmin:

DELETE FROM airport WHERE Title=ABC

It gives me this error:

Unknown column 'ABC' in 'where clause'

If I run this in phpmyadmin it works:

DELETE FROM airport WHERE Title="ABC"

But if I add quotes in my php code the page dies. Any pointers?

  • 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-01T03:35:15+00:00Added an answer on June 1, 2026 at 3:35 am

    since title field of your db is varchar, better encode $title with single quote and use mysql_real_escape_string too for cleaning unsafe db chars.
    like:

    $result = mysql_query(sprintf("delete from airport where title = '%s'", mysql_real_escape_string($title));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It's my first time using PostgreSQL 8.4.2 with Django(I have always used MySQL or
I am doing this first time so I need some help. I am using
First time poster here. A quick question about setting up a loop here. I
I am setting up an Oracle connection for NHibernate for the first time. I
I've realised for the first time a couple of weeks ago that when setting
first time posting here. I'm using a loop to create 3 buttons, but my
first time use JTree. Just wondering is it possible to have more than one
First time Stack Overflow poster. Please bear with me! :) I have a set
first some data: we are using Oracle 11g databases. A primary database running on
I'm having a hard time setting up the basic structure of my databases. I

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.