• I have tested with rand() but its generating duplicate number . I need unique number for each transaction in my application thats why .