Forum Moderators: coopster
id ¦¦serialno¦¦company¦¦advice_note¦¦shipdate
5 ¦¦123456¦¦STOCK ¦¦ ¦¦0000-00-00
25 ¦¦123457¦¦STOCK ¦¦ ¦¦0000-00-00
60 ¦¦555666¦¦STOCK ¦¦ ¦¦0000-00-00
2500 ¦¦458996¦¦STOCK ¦¦ ¦¦0000-00-00
5800 ¦¦999991¦¦STOCK ¦¦ ¦¦0000-00-00
5959 ¦¦999956¦¦STOCK ¦¦ ¦¦0000-00-00
6589 ¦¦458964¦¦STOCK ¦¦ ¦¦0000-00-00
8630 ¦¦126548¦¦STOCK ¦¦ ¦¦0000-00-00
10600¦¦188925¦¦STOCK ¦¦ ¦¦0000-00-00
I can update a single line no problem but mutiple lines I just dont know where to start.
If you want to update all those rows with the same data then here is sql statement:
update TABLENAME
set company = "some value", advice_note = "some value", shipdate = "some value"
where id = 5 or id = 60 or id = 2500 or id = 8630
Note: such "compound" update statement is not recommended because it would not use index => thus slowness on large tables.
Bottom line: in either case you would better run separate query for each row :-)