Jump to content

Checkbox form selects from MySQL table column with datatype EM


lostinfourth

Recommended Posts

have a database with a column of datatype EM (multiple selection, say apples, oranges, grapes)

 

I want to have a form with checkboxes for those values (apples, oranges, grapes etc) so one can select a breakfast basket type that contains for example, oranges and grapes.

 

It would pull from the database those baskets with those selection of fruits (specified in the column 'Fruits', which is a EM datatype column. (I have a multiple selection when entering the values for the column.)

 

Can it be done? Should I make another table with FruitNames?

Link to comment
Share on other sites

Hi, thanks for your reply.

 

When I enter a row in my database, one of the columns is called "FruitsinBasket" -- I have different types of baskets and I select the fruits in that particular basket. The column is a datatype EM, so I can select multiple fruits for each basket.

 

I'd like the customer to be able to search for those baskets containing certain fruits, from a page with a list of available fruits (checkboxes) and return a list of the baskets that match their selection of fruits.

 

Is this possible? Or should I have one column for each fruit or a different table entirely for the fruits?

 

Thanks, I'm very new to all 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.