I have this query like this: INSERT INTO oc_stock_hpp (product_id, buy_price) VALUES ( \'3337\', (SELECT buy_price FROM oc_stock_hpp WHERE product_id =\'3337\' ORDER BY id DESC