Re: Unique id Number
| From: | Piotr Pluciennik | Date: | Mon, 14 Jan 2002 15:57:42 +0000 |
| Subject: | Re: Unique id Number | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-11427@lists.php.net to get a copy of this message | ||
Hi,
yes, you can. If you're using MySQL try to use
mysql_insert_id function - it should solve your
problem.
For more explanations and examples - see manual:
http://www.php.net/manual/en/function.mysql-insert-id.php
and for all mysql functions:
http://www.php.net/manual/en/ref.mysql.php
Greetings
Piotr
--- James Mansfield <james@eleventen.com> wrote: >
OK...newbie question it must be:
> I want to add an entry into a db tb (using php
> obviously) and when its added
> into the db its gets a sequencially numberred
> id....now can I retrieve this
> id numbe rin the same php coded page as what I
> create the entry with? If not
> what is the best way around it? Create a unique
> number for the entry before
> adding it into db??
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-windows-unsubscribe@lists.php.net
> For additional commands, e-mail:
> php-windows-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com