dow5001 2011-09-04 20:39
浏览 60

如何设置外键并从多个表中检索或删除数据?

I am new to php and mysql. I created a database named 'students' which contain two tables as 'student_details' which have fields like 'ID, Name, Age, Tel#, Address' and another table as 'fee_details' which have fields like 'ID(student_details table ID), Inst Id, Date, Receipt No'.

I want to set a foreign key and retrieve data from both tables when a student paid their fees and if a student passed out or discontinued I want a delete option to delete his all records from my tables. So please help me to solve this by PHP code and displays it in HTML while using a search form.

  • 写回答

2条回答 默认 最新

  • dpziir0079 2011-09-04 20:48
    关注

    you can try mysql_query() and mysql_assoc_array()

    评论

报告相同问题?