List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:February 7 2002 2:27am
Subject:Re: Resolved: mysql_insert_id error
View as plain text  
At 14:07 -0700 2/6/02, Nathan Bank wrote:
>Though this is a PHP issue, for those that use PHP here's what was 
>wrong: mysql_insert_id() requires
>your connection link identifier, which is what is returned from 
>mysql_connect and mysql_pconnect.
>This is contrary to almost all other mysql_ functions, which want 
>the result resource returned from
>your query.

I guess that's one way to look at it.

Another way is that mysql_insert_id() is consistent with all the other
mysql_ functions in that it requires arguments that are appropriate for
the type of information you're requesting. :-)

In this particular case, the insert-id is maintained on a connection-specific
basis, so it would be strange for it to require a result resource rather than
a connection identifier.

>Hope this saves a few people some agony.
>
># Nathan


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <mysql-thread98785@stripped>
To unsubscribe, e-mail <mysql-unsubscribe-cyon=bestweb.net@stripped>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Thread
mysql_insert_id errorAndrea Caldwell6 Feb
  • Re: mysql_insert_id errorDL Neil6 Feb
  • Resolved: mysql_insert_id errorNathan Bank6 Feb
    • Re: Resolved: mysql_insert_id errorPaul DuBois7 Feb
Re: Resolved: mysql_insert_id errorPaul DuBois12 Feb
Re: mysql_insert_id errorDL Neil12 Feb