say i have one table with several fields, and want to update one field many times with different values
Code MySQL:
I am excuting the UPDATE operation inside a loop, so I need to figure out how to do it in just one query.
I know how to do it with INSERT.
Code MySQL:for($i=0; $i < 10; $i++){ $val = ...; $member = ...; $comma = ($i == 9)?'':','; $insert .= "('$val','$member','$id')".$comma; } $q_insert = "INSERT INTO sample_table VALUES".$insert."";










Bookmarks