0

Currently i have a table 'droster' that has:

id - game_name - .....

I want to put in the information once they fill out a form the ID that is auto populated into another table 'dtraincompleted':

id - time -...

I have been tring to comeup with a trigger that will allow it do this and i have not totally grasp the concept and need a little more advice with explaination of how it works so i don't have to ask again. I do appreciate it..

i have another trigger that i will need to make but want to learn how to make this one as it is simpler that making a new colomn each time a new training class is added which will make a colomn on the dtraincomplete table..

-------------------edit-------------------------------

 id from the newly created row of information to id to the other table
  • For clarification: You are inserting into droster table. It has an autoincrement primary key called `id`. Everytime a new row is inserted into droster, you want to insert a new row in a table called dtraincompleted, with the column values of droster's ID and the current date time? This may answer your question: http://stackoverflow.com/questions/4753878/how-to-program-a-mysql-trigger-to-insert-row-into-another-table – AgRizzo Mar 24 '14 at 15:36
  • Yes and no i do not need the date as that is not a needed thing on the table at this time... I have actually worked out the PHP to do this for me... Although now i am having troubles making a column with php using variables. – saladin1980 Mar 25 '14 at 16:44

0 Answers0