I am getting the following error message
“Transactions not supported in ‘mysql’ driver. Use ‘mysqlt’ or ‘mysqli’ driver”
Can anybody help - I looking at a way to update or insert data into another table after
a Form is update or a new item is added…
Looking for some HOT Tips …!
here is the code that I use :
$dsn = ‘mysql:host=localhost;mydatabase;’;
$user = ‘fredy’;
$password = ‘xxxxxxxxxxxxxxxx’;
try
{
$dbh = new PDO($dsn, $user, $password);
$dbh->setAttribute(PDO::ATTR_ERRMODE,
PDO::ERRMODE_EXCEPTION);
$sql = ‘INSERT INTO syspara
(SysID, Xcomp, Xadd1)
VALUES (:SysID, :Xcomp, :Xadd1)’;
$stmt = $dbh->prepare($sql);
$stmt->bindParam(’:SysId’, $SysID);
$stmt->bindParam(’:Xcomp’, $Xcomp);
$stmt->bindParam(’:Xadd1’, $Xadd1);
$stmt->execute();
}
catch (PDOException $e)
{
echo 'PDO Exception Caught.
';
echo ‘Error with the database: <br />’;
echo 'SQL Query: ', $sql;
echo 'Error: ’ . $e->getMessage();
}