didn't work:
I've tried several ways but none actually executes. I just keep getting warnings and fatal errors. My last one is:
<?php
$Recordset1 = "SELECT webuser_id, w_password FROM web_user_test2_copy";
$Result = mysqli_query($convacc_cx, $Recordset1);
//$Result = $convacc_cx->query($Recordset1); // this is the object oriented way of the above
$Rows = $Result->fetch_all();
foreach ($Rows as $row) {
$Recordset1 = 'UPDATE web_user_test2_copy SET w_password = ? WHERE webuser_id = ?';
$convacc_cx->query($Recordset1, [
password_hash($row['w_password'], PASSWORD_DEFAULT),
$row['webuser_id'],
]);
}
echo "Passwords updated\n";
?>
I know this one is causing the problem but don't know how to write it:
$Rows = $Result->fetch_all();