troubleshooting Question

MySQL Update Statement Syntax / PDO

Avatar of rowdyj81
rowdyj81 asked on
12 Comments1 Solution534 ViewsLast Modified:
I recently added PDO support to our server.  Not surprisingly, some php scripts that worked before this update are now glitching up.  I have a very simple script that updates a field in a database when a form is submitted.  This SQL statement works when I execute it in phpMyAdmin.  When the form is submitted, it does not work; however, I don't get an error message. Everything in the targeted field in the database gets erased.  Nothing gets updated.  

Here is my code.  Anyone have an idea what's going on?  I know this has to be something stupid that I'm missing.
$sqlone = "UPDATE specials SET content = '$content' WHERE label = 'specials'";
$queryone = mysql_query("$sqlone", $con);

Open in new window

Sr. System Analyst

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 12 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros