There is no entry when I execute the below, yet the update acts as if
all is OK yet nothing is updated (works same if beginTransaction and
commit is uncommented).
What is interesting is that the reverse (eg INSERT attempted first works OK.
My concern (other than I what to know why it doesn't work) is that
the "normal" case would be UPDATE and thus using the reverse sems
like it will be slower.
TIA,
Tom
try {
//$db_conn->beginTransaction();
$sql = "UPDATE av_summary SET tot = tot + 1 WHERE
name='$av_system';";
$result = $db_conn->exec($sql);
//$db_conn->commit();
} catch (PDOException $e) {
//$db_conn->beginTransaction();
$sql = "INSERT INTO av_summary (name, tot, sig,
huristic, paranoid) VALUES ('$av_system', 1, 0, 0, 0);";
$result = $db_conn->exec($sql);
//$db_conn->commit();
$sql = "CREATE TABLE $av_system (virus VARCHAR
UNIQUE, cnt INTEGER);";
$result = $db_conn->query($sql);
}
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------