Is there a way to INSERT INTO a database table but only if it doesn't create a duplicate row. Could I use WHERE?
So if I am inserting an item number but that item number already exists.
My small pea brain has trouble grasping UNIQUE. So if I make one column of my table unique, like an order number for example, and my php script trys to insert a row where the order number already exists, then the insert will not happen?
You should make a primary key/unique key from the column/columns which should be unique.
On trying to insert a 'duplicate' record you will get an error, which you can then handle and perform some other action based on this, such as updating the record rather than trying to insert a new one if appropriate