Jump to content

does anyone know the best way,


blanktarget

Recommended Posts

I have form data where one field is a multiple select. I\'ve set up a table for the multiple select data-\'group\', I have a table for the rest of the data-\'listing\'. I have a third table-\'link\' which has the primary keys from each of the other tables, group_id and listing_id, because I need each client\'s listing, which is phone, name, etc. to correspond with all of the groups that they select in the form.

 

I have this layyed out as a script but it seems messy and I don\'t know if it will work as the database grows

 

after connection and form validation:

 

insert into table listing (column_1, etc) values ($name, etc)

select * from listing order by \'listin_id\' limit 0, 1 //to get the last row?

 

and then insert the groups selected with the listing_id for reference into the \'link\' table. Somehow this seems like it\'s almost there. That multi select is killing me, this should be easy.

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.