SQL UPDATE with LIKE

后端 未结 7 1613
夕颜
夕颜 2020-12-18 03:27

I was trying to update approx 20,000 records in a table by using statements like this one, however, I got the message say 0 row(s) affected so it didn\'t work.<

7条回答
  •  醉梦人生
    2020-12-18 03:48

    was looking for same but didn't work for me.... but this works perfect:

    $title = "Worklog details";
    $log_name = 'PC01';
    $update = $connection -> prepare("UPDATE nc_files 
    SET title = ? 
    WHERE log_name = ?");
    $update->bind_param('ss',$title,$log_name);
    $update->execute();
    $update->close();
    

提交回复
热议问题