I have a table in my schema which looks like this:
X(rID(PK), cellID, Pos, type, serial, version, vendorType,invType,opState, freq, rackNo, bandID, statusID).
This table X is supposed to give aggregate information about the devices we have.
I have 3 triggers on this table -- insert, update, delete so that when something like a status or position changes of the device, the changes are reflected into a different table which tracks the history of this table.
The issue: field 1 is the primary key, so it has to be manually inputted, fields 2,10,12,13 are FKs and come from other tables PKs, and fields 2,3,4,5,6,7,8,9,11 are all info coming directly from a reporting server (which i have stored in another table, but they are not FKs).
I want to insert into X in one try. Not have three separate inserts, because that would mean three separate rows into this history-tracking table for every row in X... which is a problem.
I am using phpmyadmin and mysql. Is there something I can do here to combine all of this in one insert (the update/delete triggers arent a huge issue right now)?