[eluser]Ninja[/eluser]
Firstly Thanx guys i really appreciate all the assistance
@ ntheorist
lol just for the record Im not a he... (Yip female developer)
Thanx for the code it works but not entirely i think the scope might be a bit off because it only excludes the last client in the array instead of all of them. thats why i had the company foreach loop nested.
I am using in-table foreign keys. company_id is a column in the clients table. The idea was to have companies as an abstract class and have clients, manufacturers and suppliers inherit from it, as i felt this would reduce redundancy. I love the use of in table foreign keys as it makes things so much simpler and im willing to change anything to avoid using joining tables.