How to add records to the table, only if there is no such record yet (without taking into account the auto-increment column when comparing).
You can like this:
INSERT IGNORE INTO `tab` SET `tovar` = "vedro", `money` = 100; but then the auto-increment increases with each check, despite the fact that the record was not added, how to avoid it?
What is the fastest way to check?