how can i change auto increment (primary key) to micro time format?
- Single Page
Posted 07 October 2012 - 19:25 PM
groc crud freshie here
Posted 07 October 2012 - 19:39 PM
http://www.grocerycrud.com/documentation/options_functions/callback_before_insert
http://www.grocerycrud.com/documentation/options_functions/set_primary_key
Posted 07 October 2012 - 20:16 PM
how can i intergrade that code with groc crud? do i've to create separate function for it?
Posted 08 October 2012 - 06:12 AM
function crud()
{
......
$crud->callback_before_insert(array($this,'my_primary_key'));
......
}
function my_primary_key($post_array)
{
$post_array['your_primary_key_field'] = this->primary();
return $post_array;
}
function primary()
{
$primary = your code for creating primary key
return $primary
}