S
|
steveh 1/6/2010 |
|
T
|
thesofa 1/7/2010 |
Assuming you are using MYSQL, you can set up compound primary key, see here |
![]() |
phray author 1/7/2010 |
And a before add and edit event to provide a proper meaningful error message (rather than just letting it fall into the error trap with a "primary key violation" message that most users will not understand). That's a good point, I'll have to get to work on that. Assuming you are using MYSQL, you can set up compound primary key, see here I am using MySQL and I had no clue about compound keys! That's very interesting and I think it will work perfectly. |
T
|
thesofa 1/7/2010 |
may i suggest that you have an ID field in each of the counsellor and couple tables, both autoincrement. |
![]() |
phray author 1/8/2010 |
may i suggest that you have an ID field in each of the counsellor and couple tables, both autoincrement. The third table is comprised of the same ID fields from the counsellor and the session, click on both to make compound primary key, a third field being the comments. Voila, sorted except for the error trapping. One of the effects of PHPRunner being so powerful and so well written is there are loads of people writing databases and front ends with quite thin knowledge of database management. The temptation is to dive in and start making pages, but in reality one needs to spend a while thinking through the tables and normalising them. It really pays off in the long run. HTH G
|