Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Retrieving AUTO Increment ID from MYSQL

New Here ,
Mar 13, 2007 Mar 13, 2007
Hi All,

I am trying to get the ID issued from MYSQL from an Auto Increment field after an Insert Update command. I keep getting this error....

Warning: mysql_insert_id(): supplied argument is not a valid MySQL-Link resource in /www/mesa/conference/registration/TMP47yo0evkno.php on line 65

Warning: Cannot modify header information - headers already sent by (output started at /www/mesa/conference/registration/TMP47yo0evkno.php:65) in /www/mesa/conference/registration/TMP47yo0evkno.php on line 67

Plus once I get the ID, can someone help with code to pass onto the next page.

Thanks!
TOPICS
Server side applications
377
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 14, 2007 Mar 14, 2007
LATEST
sock_s wrote:
> I am trying to get the ID issued from MYSQL from an Auto Increment field after
> an Insert Update command. I keep getting this error....
>
> Warning: mysql_insert_id(): supplied argument is not a valid MySQL-Link
> resource in /www/mesa/conference/registration/TMP47yo0evkno.php on line 65

It looks as though you're using your remote server as a testing server.
Upload your page to your server and test it there.

The following page shows the correct way to use mysql_insert_id():

http://www.php.net/manual/en/function.mysql-insert-id.php

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines