• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Sql Query to count number of lines in signatures


Active member

I found some time ago a query to count the number of lines in mysql field but I can't find it anymore.
Can anyone help me with this?
That query would count the line break and carriage return in the signature field I just adapted to my needs.
I'm going to try to find it so other can use it is needed.



Active member
Just got something close to what I need, but it's not precise:

SELECT user_id, ROUND ( ( LENGTH( signature ) - LENGTH( REPLACE ( signature, "\n", "") ) ) / LENGTH("\n") ) AS count FROM xf_user_profile
Continuing to look for..