Jump to content

Check if textbox is different from database field


Adamhumbug

Recommended Posts

I am building a system where people are able to choose a food menu, they can modify each dish if needed and then say how many of each item they need for the order.

So when they pick the breakfast menu, it selects all starters, mains and desserts.  Should something need to be edited (sausages changed to vegitarian sausages) the user should be able to overtype what has been populated from the select statement)

When the form is submitted, the order needs to be linked to the current job which is in a field ssm_job.job_id but the changes to the menu items need to be stored somewhere for the current order only.  This obviously needs to be accessile later so further changes can be made if needed.  I am not sure of the best way to go about this as i am trying not to save every item in another database (just trying to be tidy)

Any advise on this would be greatly appreciated.

I have had help on this project in relation to an sql and the background can be found below, the help has been amazing but as this is a very different question i thought i would start a new thread.

 

Kind Regards

Link to comment
Share on other sites

How far can they go with changing the dish?


"I want a full English breakfast, but I'd like roast potato instead of hash browns, roast turkey instead of bacon, chipolatas instead of sausage, carrot puree instead of mushrooms, cranbery sauce instead of tomato, sprouts instead of baked beans and some gravy instead of eggs.
Toast and marmalade? No thanks, I'll have Christmas pudding with rum-flavoured white sauce."

Link to comment
Share on other sites

When you talk about the user changing the food selection, why is that new choice not part of your database already?  If you are going to 'offer' it as an option, why is it not listed for the user to select in the first place?  That would solve what appears to be a big problem at the moment.

Link to comment
Share on other sites

40 minutes ago, Barand said:

How far can they go with changing the dish?


"I want a full English breakfast, but I'd like roast potato instead of hash browns, roast turkey instead of bacon, chipolatas instead of sausage, carrot puree instead of mushrooms, cranbery sauce instead of tomato, sprouts instead of baked beans and some gravy instead of eggs.
Toast and marmalade? No thanks, I'll have Christmas pudding with rum-flavoured white sauce."

Yes pretty much, they will have the option to change all or part of the menu

Link to comment
Share on other sites

27 minutes ago, ginerjm said:

When you talk about the user changing the food selection, why is that new choice not part of your database already?  If you are going to 'offer' it as an option, why is it not listed for the user to select in the first place?  That would solve what appears to be a big problem at the moment.

when making the order, they may agree with the client a special menu package.  This may have small one off changes.

 

The menu items can be pretty long.

Herb crusted Marinated Rump of Lamb, served with petit pois a la francese, roasted baby potato, blistered cherry tomatoes, rich lamb jus

They may only want to change roasted to boiled.

The chnages should not be selectable by default.

Link to comment
Share on other sites

"The ch(an)ges should not be selectable by default".  

What does that mean?  Apparently we already are to assume that you don't have them in your list of available food choices, so what does this sentence tell us?

Plus - with all of these possible changes what is the app supposed to actually accomplish for you?  Aren't you simply going to pass along the customer's order to the kitchen staff, either manually or via a computer screen, as the diner has specified?

Link to comment
Share on other sites

Seems like your database got bigger

+-----------------+                                                
|     menu        |                                                
+-----------------+                              
|  menu_id        |--+                                             
|  description    |  |                                 
+-----------------+  |                                      
                     |                         
                     |     +-----------------+   
                     |     |  menu_dishes    |   
                     |     +-----------------+   
                     +----<|  menu_id        |         +-------------------+
                           |  dish_id        |>--+     |     dish          |
                           +-----------------+   |     +-------------------+
                                                 +----<|  dish_id          |----+      +----------------+
                           +-----------------+         |  name             |    |      | ingredient     |
                           |  course         |    +---<|  course_id        |    |      +----------------+
                           +-----------------+    |    +-------------------+    |      | ingred_id      |----+
                           |  course_id      |----+                             +-----<| dish_id        |    |     +----------------+
                           |  description    |                                         | name           |    |     | substitute     |
                           +-----------------+                                         +----------------+    |     +----------------+
                                                                                                             |     | sub_id         |
                                                                                                             +----<| ingred_id      |
                                                                                                                   | new_item_desc  |
                                                                                                                   | event_id       |
                                                                                                                   +----------------+

 

Link to comment
Share on other sites

  • 2 weeks later...
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.