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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:22:55+00:00 2026-05-25T16:22:55+00:00

How can I insert a piece of HTML Code (containing and ‘) into my

  • 0

How can I insert a piece of HTML Code (containing ” and ‘) into my MySQL database?

It’s not that easy for me to simply escape all the ” and ‘ with a backslash, so I’m looking for other solutions. All the solutions I have found are depended on some programming language, such as PHP, like in this example.

The programming language I’m using is Python, but I’d prefer a general mysql solution.

The piece of code I want to insert could e.g. look like this:

<tr>
<td width="140"><img alt="2345234523" src="images/stories/2345234523.png" height="105" width="140" /></td>
<td width="163">"mp3's"</td>
<td width="180">"ogg's"</td>
</tr>

(this is just random code, not neccessarly senseful or working)

Thanks in advance!

  • 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-25T16:22:56+00:00Added an answer on May 25, 2026 at 4:22 pm

    Generally speaking:

    You need to escape data before it is inserted into the mySQL query. The Python library that provides access to mySQL should provide an escaping function to do this, or escape the data automatically using prepared statements.

    The reason why string data needs to be escaped is that quotes (" or ') can break the SQL statement that is used to enter the data.

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

Sidebar

Related Questions

Is '' a valid piece of XML? Can '' insert into oracle xblob column
How i can insert data into more than one table of an Access database
Is there a way that I can insert values into a VB.NET Dictionary when
So I have made a little piece of code that will insert and manipulate
I have C# code that creates HTML. One particular piece of code creates a
I'm not sure how to explain this but this piece of code bellow can
This code works. I can't figure out how to insert data into db If
I know that you can insert multiple rows at once, is there a way
I know that I can insert multiple rows using a single statement, if I
I store user editable articles in a database. Users can insert some simple widgets

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.