Hello,
I have a table in a database which handles products’ data. This table have many columns, two of them are the problem. The first one is [i]
product_id[i]barcode
product equals to the product_id value or not. The [i]product_id[b]Auto Incremented[i]
barcode
The problem is:
When I want to make the value [i]barcode[i]product_id
[code]
INSERT INTO products (product_id, barcode) VALUES (“”,product_id);
The value assigned to the [i]barcode
after the [i]barcode
However, I used [b]mysql_insert_id()
to the barcode, [i]i.e barcode value = product_id value
The real problem is:
In a real world web application, I think, [b]mysql_insert_id()
probably using the application at the same time, i.e the same table ([i]products
[QUOTE]
The most recently generated ID is maintained in the server on a per-connection basis. It will not be changed by [b]another client
even be changed if you update another AUTO_INCREMENT column with a non-magic value (that is, a value that is not NULL and not 0).
The question is : Is everyone (every web page’s browser to the application) using the web application regarded as single client? Or the
application itself (Website or PHP parser) regrded as the client?
If the answer to the second question is yes, what would I can to do to complete my task.
Best Regards.