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
Post a Comment