I am now using mnesia database, and I have a user table with record <div><br></div><div>#users{</div><div> uid,</div><div> username,</div><div> password</div><div> }</div><div><br clear="all">
Problem one is if a username is already in the table, it would not be inserted into the table. Should I first query the table to see if there is a same name in it? Any other good methods?</div><div><br></div><div>Problem tow is the uid should be auto increased each insert time, I have no idea about this... Should I change the type of table to ordered-set, and query the last record's uid value, increase it by myself?</div>
<div><br></div><div>If anyone have some good idea, or something about mnesia which I don't know, please tell me, thanks.</div><div><br></div><div><br></div><div>Oizys <br>-- <br>--<br><br>---------------<br> ÖÂ<br>
Àñ£¡<br><br> <br>Íõ·É<br>
</div>