3 messages in com.mysql.lists.mysqlHow to create references and insert i...
FromSent OnAttachments
Andreas Bauer26 Jun 2006 16:36 
Gabriel PREDA27 Jun 2006 01:16 
Andreas Bauer28 Jun 2006 05:12 
Subject:How to create references and insert into values in phpmyadmin?
From:Andreas Bauer (andr@arcor.de)
Date:06/28/2006 05:12:26 AM
List:com.mysql.lists.mysql

Hello NG,

how can I implement a reference in phpmyadmin between two fields from two different tables, so that the two fields of the two different tables have the same values? And if I have to fill this two tables by building and executing the insert into command, which default value of the referenced fields do I have to take using the insert into command? The primary key ID field of the first table do not have a value by building the insert into command. But the other referenced field of the table two? Which value using insert into? The two referenced fields are an auto_increment, primary key ID field of the table 1 and another field, Typ: index, of the table 2. In postgres the value filling the table 2 is currval(sequence), how to in mysql?:

insert into table 2 (authorid, title, subtitle) values (currval('s_authors'), 'Effektiv C++ Programmieren', '50 Wege zur Verbesserung Ihrer Programme und Entwuerfe');

Best regards Andreas