add UNIQUE KEY in any column - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6) +--- Forum: Issues (https://forum.codeigniter.com/forumdisplay.php?fid=19) +--- Thread: add UNIQUE KEY in any column (/showthread.php?tid=61561) |
add UNIQUE KEY in any column - rejoan - 04-26-2015 Hi, How can i add a unique key to a column? $this->dbforge->add_key() only able to do add primary key. I there are any way to add unique, full-text etc key? Thanks RE: add UNIQUE KEY in any column - rejoan - 04-26-2015 Got it, $fields = array( 'email' => array( 'auto_increment' => TRUE, 'unique' => TRUE ), ..... |