Jump to content


Photo

Comparing Entered Data To Existing Product Names In A Table


  • Please log in to reply
3 replies to this topic

#1 JakeMogul

JakeMogul

    Member

  • Members
  • PipPip
  • 13 posts

Posted 29 November 2012 - 09:33 AM

So this has been bugging me for a while.

I'm trying to create an ordering system for my work. Any product that needs to be restocked has to be typed into a text box. All entries are added to a list.

BUT...

Anything that's typed into the text box has to match with the product name in an existing table of data in the database. This is to prevent staff from ordering items that they shouldn't because fewer and fewer suppliers are willing to accept returns these days.

If it was free text I could easily create this, but I'm not sure how to go about having the character string entered into the text box compared to product names in a table?

Any help?

Thanks...

#2 PFMaBiSmAd

PFMaBiSmAd

    Advanced Member

  • Staff Alumni
  • 16,767 posts
  • LocationColorado, U.S.A.

Posted 29 November 2012 - 09:43 AM

You would avoid the problem entirely by retrieving a list of permitted items from the database and present that to the user to pick from, typically via a select/option drop-down menu.

Edited by PFMaBiSmAd, 29 November 2012 - 09:44 AM.

Signature: (not a comment about anything you posted unless specifically indicated)
Debugging step #1: To get past the garbage-out equals garbage-in stage in your code, you must check that the inputs to your code are what you expect.

Programming is just problem solving, but it is done in another language. You must learn enough of the programming language you are using to be able to read and write code.

#3 JakeMogul

JakeMogul

    Member

  • Members
  • PipPip
  • 13 posts

Posted 29 November 2012 - 07:03 PM

Yes, I could do this, but there'll be more than 2000 items in the list. I don't know how practical it would be...

#4 PFMaBiSmAd

PFMaBiSmAd

    Advanced Member

  • Staff Alumni
  • 16,767 posts
  • LocationColorado, U.S.A.

Posted 29 November 2012 - 07:09 PM

You would have category menu/links or a type-a-head search to limit the selections to a smaller set.
Signature: (not a comment about anything you posted unless specifically indicated)
Debugging step #1: To get past the garbage-out equals garbage-in stage in your code, you must check that the inputs to your code are what you expect.

Programming is just problem solving, but it is done in another language. You must learn enough of the programming language you are using to be able to read and write code.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com