|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
For example I insert row into base (MySQL). The first field id - an primary key generate also is inserted itself autoincrement.
As after an insert at once to receive this number for inserting in other table. |
|
#2
|
|||
|
|||
|
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by dema501:
For example I insert row into base (MySQL). The first field id - an primary key generate also is inserted itself autoincrement. As after an insert at once to receive this number for inserting in other table.[/quote] Use the LAST_INSERT_ID() function. - Glen |
|
#3
|
|||
|
|||
|
Maybe it better URL
$dbh->{'mysql_insertid'}; |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > DBI & MYSQL (How to receive autoincrement a field after an insert) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|