mysql - Get column values of the updated row -
this question has answer here:
$query = "update transaction set c_status = :status c_name = :name , 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 above syntax, able update record in transaction
table. however, return boolean. want know if there way can transaction_id
(the auto_increment
field in transaction
table, c_id
, c_name
column of that) , rest of columns?
this question not related pdo mysql in general.
update queries not intended return anything. row database have use select query.
Comments
Post a Comment