This project provides several functions and stored procedures for applications that use MySQL databases.
Function name | Parameters | Example of use | Result\Return |
---|---|---|---|
iniFCap() |
VARCHAR(250) |
SELECT initCap('victor'); |
Victor |
hiding() |
VARCHAR(120) ,VARCHAR(1) ,INT(11) ,INT(11) |
SELECT hiding('4290 8930 5632','*',2,12); |
42** **** **32 |
iniCap() |
VARCHAR(250) |
SELECT initCap('victor luis'); |
Victor Luis |
moneyFormat() |
String(22) Decimal(22,2) , String(2) |
SELECT moneyFormat(2020.12,'$'); |
$2.020,12 |
shortName() |
VARCHAR(250) |
SELECT shortName('Victor Luis Santos') |
Victor L. Santos |
pasTimer() |
DateTime |
SELECT pasTimer('2020-12-21 18:30:15') |
1h |
Stored Procedures name | Parameters | Example of use | Result\Return |
---|---|---|---|
relocatedId() |
VARCHAR(250) |
CALL relocatedId('users'); |
Antes: SELECT MAX(id) FROM <your_table> Return: 190Depois: SELECT MAX(id) FROM <your_table> Return: 140 |
criptoFields() |
VARCHAR(250) |
CALL criptoFields('users','senha','MD5'); |
SELECT senha FROM user Antes: 123456Depois: 'e10adc3949ba59abbe56e057f20f883e' |
removeDouble() |
VARCHAR(250) |
CALL removeDouble('products','name'); |
SELECT COUNT(t.total) AS total_repetidosFROM (SELECT COUNT(name) AS total, name FROM products GROUP BY name) t WHERE t.total>1 Antes: 1Depois: 0 |
- You can Download to MySQL 5.6Version with Workbench in:
Download
or if you using Windows:
Download windows
I made this repository to commemorate the conquest of MySQL Linkedin certificate that could