I have a table with a row with data like '/2323/3235/4545/222/', how can I count the number / in each row using only mysql.
'/2323/3235/4545/222/'
A quick search came up with the following:
SELECT LENGTH('/2323/3235/4545/222/') - LENGTH(REPLACE('/2323/3235/4545/222/','/','')) ... etc;
link
SELECT LENGTH('/2323/3235/4545/222/') - LENGTH(REPLACE('/2323/3235/4545/222/', '/', '')) AS `occurrences`