Welcome Guest, Not a member yet? Register   Sign In
Inserting post data into joining table, any help!
#1

[eluser]ppwalks[/eluser]
I have a form which allows the user to create products and add them to category, the categories are linked through a joining table and many products can belong to many categories.

I have extracted the post data into an array, but what I'm struggling with is updating the database with multiple entries pertaining to one product_id ie..

product_id = 1 -> category_id = 4
product_id = 1 -> category_id = 6
product_id = 1 -> category_id = 7
product_id = 1 -> category_id = 34

My logic is to run a foreach loop into the database but don't know how, can someone point me in the right direction please!


Messages In This Thread
Inserting post data into joining table, any help! - by El Forum - 08-07-2012, 09:50 AM
Inserting post data into joining table, any help! - by El Forum - 08-07-2012, 12:17 PM
Inserting post data into joining table, any help! - by El Forum - 08-08-2012, 06:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB