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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:34:58+00:00 2026-06-11T06:34:58+00:00

I cant insert this query into mysql. I did a json.dump(). I tried text

  • 0

I cant insert this query into mysql. I did a json.dump(). I tried text and blob. I tried opening and closing quotes.

INSERT INTO mytable (campaign_object) 
VALUES ( {"cpa_type": "null", "device_tablets": "True",
 "language": "all", "end_date": null, "bid": "1", "budget": "1", "goal_type": "ctr",
 "frequency": "null", "location": "all", "device_mobile": "True", "device_desktop": 
"True", "impressions": "null", "campaign_name": "1", "start_date": "2012-09-14", 
"insert_date": "2012-09-13 23:00:1347548413"})  

So…I would have to imagine that MyhSQL can handle json. I really do want want to pickle.

  • 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-11T06:34:59+00:00Added an answer on June 11, 2026 at 6:34 am

    Always use parameterized queries.

    value = '''{"cpa_type": "null", "...0:1347548413"}'''
    cursor.execute("INSERT INTO mytable (campaign_object) VALUES (%s)", (value,))
    

    This way you avoid needing to escape your json, and you’re safe from SQL injection.

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

Sidebar

Related Questions

My query looks like this: INSERT INTO table1 (lfd, somedata) select (select max(lfd) +
I wrote this query in php: $query = insert into admin values($user,$pass,$email,$signature); mysql_query($query); But
I used this query to insert all my values into this database: INSERT INTO
I can't find the error in this query: INSERT INTO realestate ( type, offer,
Cant get this script to work with my menu really have tried everything any
Do you know how to rewrite these this query in MySQL ? I can't
For the life of me I can't get this insert query to work. mysql_connect(**host**,
I have an INSERT statement that looks like this: INSERT INTO officer (officer_number, name,
I am trying to run this query but can't figure out why MySQL doesnt
I cant quite think about how to do this with mysql and php. Basically

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.