Php-script processes in turn all the rows of the sample through the function mysqli_fetch_assoc . If certain conditions are met - the value in the row must be updated. With this task, I have no problems when there is a column of type ID:
while($row=mysqli_fetch_assoc($result)){ if ($row["data"]==$condition) mysqli_query($connection,"UPDATE `$table` SET `data` = '$newdata' WHERE `$table`.`ID` = '".$row["ID"]."';"); } But if the table consists of just one 'data' column, without the 'ID' column? Is it possible for a php script to update the value of exactly the series that was obtained through the function mysqli_fetch_assoc ?
If not, please tell me another way how such an update of the data in the table could be done from one column (to save the php script a cycle in which the condition is checked with each row).
drop table,create table,insert into...... without thetruncate tablel->insert intodrop .. because the update should be done according to some condition ..... if thedatafields are not unique, there is nothing to attach to ..... and in principle, a table with one field is meaningless as such - Alexey Shimanskymysqli_fetch_assocfunction - shows good performance results and satisfies everyone until the structure of the database being processed is known. - federkupdate set все-колонки where все-колонки=старым-значениям- Mike