I've got an application in php & mysql where the users writes and reads from a particular table. One of the write modes is in a batch, doing only one query with the multiple values. The table has an ID which auto-increments. The idea is that for each row in the table that is inserted, a copy is inserted in a separate table, as a history log, including the ID that was generated.
Sorun, birden çok kullanıcı aynı anda bunu yapabilirsiniz, ben yüklenen kimliği doğru olduğundan emin olmak gerekir olmasıdır.
Ben emin olabilirsiniz Örneğin ben yaparsam:
INSERT INTO table1 VALUES ('','test1'),('','test2')
oluşturulan kimlikleri sıralı olduğu?
Nasıl Id Sadece yüklenmiş olduğunu, ve bu sadece yüklenen olanlar emin olabilir alabilirim?
Ben KİLİT TABLO thinked ettik, ancak kullanıcıların bu not olmamalıdır.
Kendimi açıkça dileğiyle ...