Guid/Uuid in PHP with MySQL
mysql, php
Solution
You can first remove the dashes with Replace() and then use Unhex()
Performs the inverse operation of HEX(str). That is, it interprets each pair of hexadecimal digits in the argument as a number and converts it to the character represented by the number.
Problem
I'd like to store uuids in the database as BINARY(16) but I need to accept them and present them as the XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX format. Before I jump to split the guid in PHP code (what a fun that is!), are there any libraries or functions that do this out-of-the-box?