Anzahl an Zeichen in einem String ermitteln
| ID | 287 |
|---|---|
| Link Reference | https://pisceansheart.wordpress.com/2008/04/15/count-occurrence-of-character-in-a-string-using-mysql/ |
| Link Credits | Not set |
| Link Technical Documentation | Not set |
| PlCodelang | MySQL |
| PlGroup | Strings |
| PlItemTitle | Anzahl an Zeichen in einem String ermitteln |
| Code | -- Gets only result with 4 "/" in the the field relativePath SELECT id ,albumRoot ,relativePath ,date ,caption ,collection ,icon ,LENGTH(relativePath) - LENGTH(REPLACE(relativePath,'/','')) AS `occurrences` FROM Albums WHERE LENGTH(relativePath) - LENGTH(REPLACE(relativePath,'/',''))=4 ; |
| Result Example |