• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
question in the dbforge class

hi every body
i want to creat a table in the phpmyadmin with the dbforge class using UNIQUE key.
but in the user guide nothing pointed to that, it said that i can creat a primary key using:
and creat key "what kind of key? i dont know" by puting this;
so when i run the code i got the id as primary, and test as index" by default i think".
so my question is how can i creat the test field as Unique key.
thanks for reading


Looking at the documentation, I do not think there is a way to create a unique index on a column using dbforge. You can just run a query like the one below to create one, though:

CREATE UNIQUE INDEX IDX_test ON table_name (test);

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.