I have table B that has reference to table A. I need to insert value to table B's foreign key. How to do it using PHP? Do I need to use mysql_insert_id()?
AngelicOne
4
Posting Whiz
Recommended Answers
Jump to Postyou can directly make change in database or use this:-
mysql_query("Alter table table_name add constraint pk_key PRIMARY KEY (column_name)");
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.