Generate a unique code.
Copy to Clipboard
Parameters
$chars_length
Total number of characters (default 8)
$table
Data table name
$column_name
Data table column name
$is_number_only
If true, use numbers only. Otherwise use random characters (default false
)
$formats
Use to format the unique code. For example, to insert a dash every 4 digits:
Copy to Clipboard
$can_echo_query
If true the query will be echoed out (default false
)
Return
string
The unique code
Example
Copy to Clipboard