Hi all,
Under mod_perl, what is the correct, safe protocol for using the handle attribute mysql_insertid from a persistant handle? Am I correct in thinking that I need to clean up attributes like {mysql_insertid}if I want to ensure that they are specific to my current call? Specifically, could I try to retrieve $dbhandle->{mysql_insertid} after a failed insert and accidentally end up with an insertid from a previous call? If so, would the best way to guard against this for each use be:

  $dbhandle->{mysql_insertid} = undef;
  #Attempt insert here
  $inserted_id = $dbhandle->{mysql_insertid};

I went looking and couldn't find anything specifically referencing use of the mysql_insertid function call in DBD::mysql.with mod_perl in mind. I can't even find the insertid functionality in DBD::mysql, but maybe I'm just too tired... Any tangentially related advice would probably also be appreciated. Thanks!
RJ Herrick

--
"A foolish consistency is the hobgoblin of little minds" -Ralph Waldo Emerson

Reply via email to