Welcome, Guest
Username: Password: Remember me

TOPIC: DB primary key (id)

DB primary key (id) 22 Feb 2012 15:16 #1434

Hi,

I have created an application with 7 tables, 3 of which are related.

It wasnt until I downloaded the component that I realised that I had unintentionally created an unwanted primary key field for each table. When I viewed the tables in PHPMyAdmin I noticed there was an 'id' field set by the Cook system and also my '#table#_id' field. Ideally I only want the 'id' field as the other field is not required!

However, when I create a new table I notice that sometimes a field is set to primary (has the star next to it). Am I missing/missunderstanding something?

Best regards,
Kris...
The administrator has disabled public write access.

Re: DB primary key 23 Feb 2012 07:12 #1439

OK, so I just removed what I defined as my primary fields and used the automatically generated ones that you cant see in the table builder.

Thanks...
The administrator has disabled public write access.

Re: DB primary key 23 Feb 2012 12:17 #1441

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
The yellow star defines the default label key. Not primary key.
Coding is now a piece of cake
The administrator has disabled public write access.
Time to create page: 0.101 seconds

Get Started