in reply to Re: Weird CGI behaviour on different Browsers - Apache
in thread Weird CGI behaviour on different Browsers - Apache

I'm thinking about that, but this decision shouldn't be in a rush because my real database table logically allowes to have dublicated numbers because the type is different. Type is order notice or bill. I'll just let this here, but I'm seriously thinking about it. Thanks.
  • Comment on Re^2: Weird CGI behaviour on different Browsers - Apache

Replies are listed 'Best First'.
Re^3: Weird CGI behaviour on different Browsers - Apache
by Corion (Patriarch) on Aug 04, 2015 at 14:01 UTC

    A constraint can span more than one column. You need to think about this long from a business perspective, but if you are certain that the combination (number, type) needs to be unique, you can create a constraint or a unique index for that.

      CONSTRAINT on type, number could be a really great idea. I'll discuss this with some fellows and see what I do. I hope I won't miss to update this topic. Maybe it could help anyone someday for taking decisions.
Re^3: Weird CGI behaviour on different Browsers - Apache
by 1nickt (Canon) on Aug 04, 2015 at 15:28 UTC

    A better database design would be to have your orders and invoices in separate tables with customers in a third. It may or may not relate to your problem, but it is clearer, less error-prone, probably more efficient, easier to debug, and way easier to develop code for.

    The way forward always starts with a minimal test.