I'm trying to perform an update on more than one table in the same query, Local normal wheel, but online gives syntax error in MySQL 5.1.72. What can be done to solve?
$query =
"UPDATE isc_products SET prodcurrentinv = 12, prodretailprice = 25, prodprice = 26 WHERE prodcode = 121212121212 LIMIT 1;" .
"UPDATE isc_product_variation_combinations SET vcstock = 54 WHERE vcsku = 121212121212 LIMIT 1;";
$query = $pdo->prepare($query);
$query->execute();
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE [42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; 'UPDATE isc_product_variation_combinations SET vcstock = 54 WHERE vcsku = 1212121' at line 1 'in /home/aoculist/public_html/admteste/template/main.php:5 Stack trace: # 0 /home/aoculist/public_html/admteste/template/main.php(5): PDO- > prepare ('UPDATE isc_prod ...') # 1 / home / aoculist / public_html / admteste / index. php (55): include ('/ home / aoculist / ...') # 2 {main} thrown in /home/aoculist/public_html/admteste/template/main.php on line 5