Easiest thing I can think of would be to add an oid column to your tables as an auto_increment field (and make it an index.) Then you've got your unique id per row, and after an insert you can get it from $sth->{mysql_insertid} or $dbh->{mysql_insertid}.
| [reply] |
lol, what are you using the oid for? Postgres OID's are not forced unique -- they will wrap (and dup) eventually. If you have a lot of inserts and deletes I am surprised you have not been caught by that already. The post above has the correct solution -- just wanted you to be aware of your design flaw.
| [reply] |
Thanks, Luckily the design had not yet been implemented. What does the above mean, Make it and index? And will the autoincrement field be given a value for every row created without specifying it to do so?
| [reply] |
You will need to read up on mysql before you dig to far into this project. auto inc type columns will auto increment the value for new inserts this combined with defining the column as unique and indexing will give you what you want.
| [reply] |