MySQL update using PDO and prepared statement not working

后端 未结 3 895
失恋的感觉
失恋的感觉 2021-01-17 13:35

I\'m having a strange problem with php PDO and mysql.

I have the following table:

create table test_table ( id integer, value text );
3条回答
  •  情话喂你
    2021-01-17 14:15

    $maker_id=1;
    $stmt = $db->prepare("UPDATE car_details SET maker_id=?");
    $affected_rows=$stmt->execute(array($maker_id));
    echo $affected_rows.' were affected';
    

提交回复
热议问题