How to generate unique ID from spl_object_hash() function in codeigniter? -


i have table of customers need generate unique id each customer manually rather auto increment in mysql. how achieve this? suggested below code uniqid(md5(spl_object_hash($custapp)), false); function:

$data = file_get_contents("php://input");  $custapp = json_decode(base64_decode($data));  $custapp->id = uniqid(md5(spl_object_hash($custapp)), false); 

but not getting how use function in code

use sha1($nombre_costumer) , save value how id unique


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -