CodeIgniter Forums
Please Help !! how to using not auto_increment id ????? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Please Help !! how to using not auto_increment id ????? (/showthread.php?tid=11635)



Please Help !! how to using not auto_increment id ????? - El Forum - 09-17-2008

[eluser]Unknown[/eluser]
I am new to code igniter, and start my own project. I usually using mysql function UUID() to get unique character id.

How to do it with code igniter ? Active record only allows id using auto increment value is'nt it? Is there any trick ? Could anyone told me the trick ?

Thanks a lot before

regards

Dawning


Please Help !! how to using not auto_increment id ????? - El Forum - 09-17-2008

[eluser]xwero[/eluser]
I don't see why you can't do
Code:
$this->db->set('id','UUID()');
If it's protected, which isn't very likely, then you can add false as a third parameter of the set method.