Re: SQL

From: Date: Thu, 19 Oct 2000 04:35:18 +0000
Subject: Re: SQL
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-3778@lists.php.net to get a copy of this message
Hi, Use PHP's mysql_insert_id() right after mysql_query() -Scott Ingo Klein wrote: > > Salute ! > > > $query="insert into email > > values(null,'$from','$to','$subject',null,'','','',null)"; > > mysql_query($query) or die(mysql_error()); > > The first column is an auto_incremented id, > > which I need to know so I can store the content of the email in a file > with that name. > > What PHP function do I need? > No PHP function but the MySQL-Query: > last_insert_id() > > Bye, Ingo. > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net -- ------------------------------------------------------------------------------- "That's a deer shooting hat." "Like hell it is. This is a people shooting hat. I shoot people in this hat."

« previous php.db (#3778) next »