Below are two tables..
How can table 'regs' populate 'type' from table
'equip'??
<code>
$sth=$dbh->prepare (" CREATE TABLE equip (
type varchar(255),
type_id smallint unsigned not null auto_increment,
primary key (type_id) ) ");
$sth->execute ();
$sth->finish ();
eval { $dbh->do("DROP TABLE regs") }; # see if table
exists, then drop !
print "Dropping sicc failed: $@\n" if $@;
$sth=$dbh->prepare (" CREATE TABLE regs (
cite varchar(255),
reg blob,
reg_id smallint unsigned not null auto_increment,
ref_id smallint unsigned not null REFERENCES
refs,
pn_id smallint unsigned not null REFERENCES permitno,
type_id smallint unsigned not null REFERENCES equip,
sic_id smallint unsigned not null REFERENCES sicc,
primary key (reg_id) ) ");
$sth->execute ();
$sth->finish ();
=====
Regards,
Investorclb
__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php