Currently I duplicate some records from one table and insert to second table.
$sql = "INSERT INTO pending_payments (user_id, course_id, amount)
SELECT user_id,course_id,monthly_subscription_fee
FROM enrol
WHERE active_shop='1'";
Okay, but Now I duplicate this records: user_id,course_id,monthly_subscription_fee
and I need add some custom values.
I show on second query:
$sql = "INSERT INTO pending_payments (data_added, type_fee)
VALUES ('_current_data', 'subscription');
Can anyone help me merge this both sql query into one? to run at the same time?