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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:16:16+00:00 2026-06-03T16:16:16+00:00

I am using the following insert statement within a tool pulling data from one

  • 0

I am using the following insert statement within a tool pulling data from one DB into another one.

INSERT INTO act_vulnerabilities_internal_test (device_type, ip_address, user_tag,       
repositoryID, severity, pluginID, pluginName, pluginText)

VALUES ("@Data.device_type~", "@Data.ip_address~", "@Data.user_tag~",    
"@Data.repositoryID~", "@Data.severity~", "@Data.pluginID~", "@Data.pluginName~",   
 @Data.pluginText~)

Error message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘\nSynopsis :\n\nIt is possible to retrieve file backups from the remote web serv’ at line 3

The data I am trying to pull from one of the columns has a lot of single and double quotes in it (this is pulling from a proprietary tool and I cannot edit the data). The column giving me the problems is the one named pluginText. Is there a way to make the db ignore the ‘ and ” contained within the rows?

Is mysql_real_escape_string what I need to do this properly?

  • 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-03T16:16:20+00:00Added an answer on June 3, 2026 at 4:16 pm

    Update: Do it with the QUOTE() function.

    Original answer:

    Please try this:

    INSERT INTO 
    ...
    VALUES (
    ...
    , REPLACE(@Data.pluginText, '"', '\"')
    )
    

    or if you have single and double quotes in it:

    INSERT INTO 
    ...
    VALUES (
    ...
    , REPLACE(REPLACE(@Data.pluginText, '"', '\"'), "'", "\'")
    )
    

    You can read more about it here

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

Sidebar

Related Questions

I'm using the following SQL statement to copy data from TableA to TableB. INSERT
I'm using the following query: INSERT INTO role (name, created) VALUES ('Content Coordinator', GETDATE()),
I am using the following situation: cmd.CommandText = insert into city (id, code, name,
I'm using the following code: $query = $dbh->prepare(INSERT into crm_order_errors .SET (order_id, number_of_attempts, last_attempt)
I am using the following SQL Server statement to insert records and return the
I'm using following update or insert Oracle statement at the moment: BEGIN UPDATE DSMS
I have a ruby script repeatedly executing the following the INSERT statement using the
I am using following method for inserting multiple rows using a single INSERT statement,
I am trying to insert into mysql from an xml using PHP, but the
I am using the MERGE statement within a database project to populate reference data

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.