$query = "UPDATE transaction SET c_status = :status WHERE c_name = :name AND c_id = :id";
$stmt = $this->handle->prepare($query);
$stmt->bindParam(':c_status',$status,PDO::PARAM_STR);
$stmt->bindParam(':c_name',$name,PDO::PARAM_STR);
$stmt->bindParam(':c_id',$id,PDO::PARAM_STR);
return $stmt->execute();
Using the above syntax, I am able to update a record in the transaction
table. However, what I only get with the return is a boolean. I want to know if there is a way I can get the transaction_id
(the AUTO_INCREMENT
field in the transaction
table, c_id
and c_name
where just a column of that) and the rest of its columns?