You are here: Re: Goto details page after insert record. « PHP Language « IT news, forums, messages
Re: Goto details page after insert record.

Posted by Norman Peelman on 07/15/07 15:41

bpsdg wrote:
> Hi,
>
> I'm using Dremweaver MX 2004.
>
> I've just started into PHP / MySQL, but it works pretty well up until now.
>
> One thing I can't seem to figure out at the moment.
>
> I have a details (display only) page, which show one record. On that page I
> have buttons for new-, update- and delete record. I got the update record
> page working, so that after updating it will go to the same record on the
> details page using an ID field.
>
> I want the same behaviour from the insert record page. But the ID field is
> an autoincrement field and I don't know how to get that when the new record
> is created. In visual basic for example I can grab the new auto increment
> field just before the record is created. But I can't find anything like that
> in PHP. It can't always just be the highest number, because maybe two users
> are adding records simultaneously.
>
> Any suggestions?
>
> Regards, Bas.
>
>
>
>

SELECT LAST_INSERT_ID() FROM table_name

Norm

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация