Jump to content

SQL Messages on form


jkpalmer52

Recommended Posts

Newbie here, looking for a code sample.

 

I'm trying to create a web site using PHP - Dreamweaver 2004 MX.

 

I have a MySQL table that has a primary key that is auto_increment but also has an UNIQUE index comprised of two fields on that table.

 

When inserting a row to the table, if MySQL detects that the 2 elements on the UNIQUE index would cause a duplicate key, I'd like to display a message on that form / page rather than taking the Dreamweaver "default" of - die (ing).

 

Is there an example that someone could direct me to that does something like this?

 

TIA -

 

-jP

Link to comment
https://forums.phpfreaks.com/topic/37790-sql-messages-on-form/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.