I am trying to insert a new row into my table which holds the same data as the one I am trying to select from the same table but with a different user_id
and without a fixed value for auto_id
since that is an auto_increment field, and setting ti
to NOW(). Below is my mockup query where '1' is the new user_id
. I have been trying many variations but am still stuck, anyone who can help me with turning this into a working query.
INSERT INTO `lins` ( `user_id` , `ad` , `ke` , `se` , `la` , `ra` , `ty` , `en` , `si` , `mo` , `ti` , `de` , `re` , `ti` ) (
SELECT '1', `ad` , `ke` , `se` , `la` , `ra` , `ty` , `en` , `si` , `mo` , `ti` , `de` , `re` , NOW( )
FROM `lins`
WHERE autoid = '4'
AND user_id = '2'
)
Thank you for taking the time to help me out!