Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Useful MySQL Expressions
CONCAT(IF(ASCII(LEFT(products_model,1))>57,LEFT(products_model,1),'0'),IF(ASCII(RIGHT(products_model,1))>57,LPAD(products_model,10,'0'),LPAD(CONCAT(products_model,'-'), 10,'0')))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment