"Even so, in point of fact, if all the potential horrible disasters you describe as potential sources of error were to occur, my code would still work correctly. "
Nope, it will fail bacause the '$name' you generate is again not unique.
The only unique thing about it is the auto_increment, which you can also retrieve using the built-in function mysql_insert_id().
"MySQL, to my knowledge, doesn't provide sequences, hence the workaround I provided. "
MySQL has auto_increment, which is in effect the same as a sequence, with the only difference that you can only define one of them per table, and you cannot get a value from it without inserting a record first.
"Maybe that lack in itself is reason enough for you not to use it, in your mind. You have stated in other posts your disatisfaction with MySQL."
I use mysql on a daily basis, mainly to port code to something a bit more intelligent, like postgresql. And why? because many developers think like you: "MySQL is cute and cuddly and I don't need all the functions that postgresql and oracle offer"
Unfortunately they think so mainly because they have no clue about what those functions really are and what they can do.
"For example, I don't need row locking, as I use other coding strategies that you would, I feel sure, would never approve of. "
I take it you mean row-locking, and not row-level-locking which mysql already supports.
That's one of my arguments against mysql, you change your coding 'strategy' to fit the shortcomings of mysql. Is that a good thing you think?
Personally I'd rather just do SELECT FOR UPDATE than write lengthy and slow routines to manually lock rows, which mess up bigtime if a script exits prematurely.
" In any real world situation, php's uniqid() function is adequate as a seed."
Adequate perhaps, for small applications, but definately NOT UNIQUE.