A long time ago, I posted this query:

>>If I use the auto-increment feature for a couple of normallized relations,

>>how do I insert into them?

>>Specifically, when I insert into a relation with the autoincrement feature

>>on the primary key, how do I get the value of the index on the newly
created

>>row so I can use that the value of a foreign key in another relation?

 

> That's database specific, and you haven't specified a database.

 

*       In MySQL - mysql_insert_id()      

 

How do I call this function? I was hoping I could use SQL such as "SELECT
mysql_insert_id() FROM XYZ" but I discovered that does not work. I'm using a
mixture of java and perl. I see in my old documentation that PHP programmers
can call such a function.

 

Thanks,

Siegfried

Reply via email to