What's the best way to insert data into two tables (I'm using GUI mode).
I guess I should say, insert data as well as update data.
For instance i have a "maintenance_requests" table and a "tasks" table.
This is being INSERTED into the "tasks" table
{
request_id: {{ maintenanceRequestsTable.selectedRow.data.request_id}},
assigned_to: {{select30.value}},
job_type: {{select33.value}},
task_status: 1
}
But I'd also like to UPDATE the 'status' column of my "maintenance_request" table at the same time.
Basically, when i insert a new record into my "tasks" table, the "maintenance_request" table it's tied to will get a status updated as well.
I have a status column for both tables.
Something like this:
INSERT this into TASKS
{
request_id: {{ maintenanceRequestsTable.selectedRow.data.request_id}},
assigned_to: {{select30.value}},
job_type: {{select33.value}},
task_status: 1
}
UPDATE the selected request_id row in MAINTENANCE_REQUESTS with
status: 1