MySQL Copying row from table to table, using PHP at same time -


i know can this:

insert anothertable (a, b, c, d) select a, b, c, d sometable somecolumn = 1 

but if instead of select a, b, c, d need update columns a, b, c, "string"

so put plainly want statement says:

insert anothertable (a, b, c, d) select a, b sometable somecolumn = 1 // , put  "string" d 

update

so ran this:

insert anothertable (a, b, c, d) select a, b, c, 'string' sometable somecolumn = 1 

it selected 3 rows different entries in 'c' column , updates 'anothertable' inserting 3 rows exact same. should different values though...

insert anothertable (a, b, c, d) select a, b,"some vale","somevalue2" sometable somecolumn = 1 

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -