|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
mysql_insert_id
I know how to use but I had a question. There is an interesting comment in the php manual about having a database which the primary field is NOT called id. Then you insert a record, get a number back and then that is an id number. now if the primary is an int that is fins - say it is a string. How do you reference the retured id back to the database record if the primary key is not returned because it is a string.
Interesting wondered if anyone here had any ideas? |
|
#2
|
|||
|
|||
|
RE: mysql_insert_id
mysql_insert_id() only works on auto_increment fields, which need to be numeric and the primary key. So I think the case you're describing is not even possible...
|
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > mysql_insert_id |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|