J
joe
i have a table with the fields pk and user; i am trying to avoid conflics
when 2 or more users do a select max(pk) and then insert pkmaxvalue, user.
i created a function that assigns max(pk) to a variable and then uses this
variable to create a record with the variable and another field for the
user that created this record. I am trying to avoid conflicts by retriving
the user from the record after the update. if the user does not match i
created a loop to create a record until the user in the record is equal to
the user that created the record. would this work?
i am trying to make the script work with mysql, unixodbc and iodbc and i
am trying to avoid locks because i dont know if i can do
$dbh->do("lock table my table in exclusive mode");
for all dbi and dbiodbc implementations.
when 2 or more users do a select max(pk) and then insert pkmaxvalue, user.
i created a function that assigns max(pk) to a variable and then uses this
variable to create a record with the variable and another field for the
user that created this record. I am trying to avoid conflicts by retriving
the user from the record after the update. if the user does not match i
created a loop to create a record until the user in the record is equal to
the user that created the record. would this work?
i am trying to make the script work with mysql, unixodbc and iodbc and i
am trying to avoid locks because i dont know if i can do
$dbh->do("lock table my table in exclusive mode");
for all dbi and dbiodbc implementations.