Jump to content

Saving / updating Arrayed Data


viviosoft

Recommended Posts

Hello all,

 

I have form that has several fields.  Each field will be saved to a table (which is a relations table we will call markups).  The form is built from another table which is an array of categories.  The output will build a form with each category and allow the end-user to input data for each category.  The information the user will be entering is markup values. 

 

Cat1 | Markup Input

Cat2 | Markup Input

Cat3 | Markup Input

 

I'll be saving the data in their own columns and not as an serialized array to the database.  I'm currently looping through the arrayed fields and saving the data to the markup relations table.  I've read other forums and serializing the data will be to difficult to retrieve for relationship purposes??  Anyway, here's my question:

 

Let's say the user is entering the markups for the first time.  They go down the list of categories and add their markups for each and click save.  Cool, no problem just do an INSERT INTO. Then, they go into the category setup screen and add a category then go back to the markup screen and now have to update the category markup that was just added. 

 

So now I have to do an UPDATE to the current listed markups table (no problem). But now I have to add another row in the same table from that array.  Is there a logical way of handling this.  I guess I'm looking for some ideas on how to accomplish this task.  I hope you guy understand what I'm after here.  Thanks for any suggestions on this.

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.