{!-- UPDATE THE ENTRY WITH THE CANONICAL --} {exp:ce_str:ing php} setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = "UPDATE exp_channel_data SET field_id_955='$entry_canonical' WHERE entry_id=$the_id"; // Prepare statement $stmt = $conn->prepare($sql); // execute the query $stmt->execute(); // echo a message to say the UPDATE succeeded // echo $stmt->rowCount() . " records UPDATED successfully"; } catch(PDOException $e) { //echo $sql . "
" . $e->getMessage(); } $conn = null; } ?> {/exp:ce_str:ing}