CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Multiple Field Unique Input Validation

Print topic Send  topic

Author Message
MichaelMcDonald

Posts: 640
Posted: 05/03/2010, 7:48 PM

On form insert or update, I would like to check in the database that a combination of 2 or more fields do not already exist in a record.

For example, I would like to check if a sale number and also an invoice number already exist together in the same record, and if
they do, return an error message that this combination is not unique.
_________________
Central Coast, NSW, Australia.

View profile  Send private message
JimmyCrackedCorn

Posts: 583
Posted: 05/04/2010, 3:37 AM

I'm an ASP guy but the way I'd do this is write custom code in the validate event and if the error condition occurs add your text to the errors collection.
_________________
Walter Kempees...you are dearly missed.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.