Welcome Guest, Not a member yet? Register   Sign In
Insert into multiple tables.
#3

[eluser]Ralanyo[/eluser]
Thanks for the reply. I've been doing some research and there are a bunch of different opinions. Transactions is one that i found. I guess an orm makes it easier to work with table relationships.

My database is myisam right now and that doesn't support foreign keys. I know it's not that difficult to change the database to innodb, but I was wondering if others are developing without foreign key relationships somehow. easy to display with a join, but not so easy with inserts , updates and deletes.

I have one form that needs to insert data into a company table and a sales rep table. Eventually i want to be able to query data later to see all companies associates to a specific sales rep. (pretty sure I can do this with a join and where)

I also wanted to use active record. Some have said to write two separate insert statement in the model for each table. Is this standard practice?


Messages In This Thread
Insert into multiple tables. - by El Forum - 08-08-2012, 10:16 PM
Insert into multiple tables. - by El Forum - 08-08-2012, 10:54 PM
Insert into multiple tables. - by El Forum - 08-09-2012, 02:59 PM
Insert into multiple tables. - by El Forum - 08-09-2012, 08:51 PM
Insert into multiple tables. - by El Forum - 08-09-2012, 09:01 PM
Insert into multiple tables. - by El Forum - 08-09-2012, 09:07 PM
Insert into multiple tables. - by El Forum - 08-09-2012, 09:09 PM
Insert into multiple tables. - by El Forum - 08-09-2012, 09:15 PM



Theme © iAndrew 2016 - Forum software by © MyBB