I have a table with a DATETIME column. I would like to SELECT this datetime value and INSERT it into another column.
I did this (note: \'2011-12-18 13:17:17\' is the
If you don't need the DATETIME value in the rest of your code, it'd be more efficient, simple and secure to use an UPDATE query with a sub-select, something like
UPDATE products SET t=(SELECT f FROM products WHERE id=17) WHERE id=42;
or in case it's in the same row in a single table, just
UPDATE products SET t=f WHERE id=42;