Question : adding FK by code

is the following format the only way/syntax to add FK through code:

ALTER TABLE FKTableNAME  WITH CHECK ADD  CONSTRAINT FKConstraintName FOREIGN KEY([ColumnName]) REFERENCES [dbo].[PKTableNAME] ([ColumnName])
GO
ALTER TABLE [dbo].FKTableNAME CHECK CONSTRAINT FKConstraintName

It would never be added as a key or index, would it?

thanks

Answer : adding FK by code

Try this:


1:
2:
3:
4:
Change:
$stp_schdtearliest=odbc_result($rs,"stp_schdtearliest");
to
$stp_schdtearliest=date("m-d-Y H:i A", strtotime(odbc_result($rs,"stp_schdtearliest")));
Random Solutions  
 
programming4us programming4us