Welcome Guest, Not a member yet? Register   Sign In
DB Forge Add Unique Column
#1

[eluser]Unknown[/eluser]
hi all,

i want to creat a table in the phpmyadmin through dbforge class using UNIQUE key.
but in the user guide nothing pointed to that, it said that i can creat a primary key using:

Code:
$this->dbforge->add_key('id',true);

and creat key "what kind of key? i dont know" by puting this;

Code:
$this->dbforge->add_key('test');

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 in advance




Theme © iAndrew 2016 - Forum software by © MyBB