1. 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

Discussion in 'XenForo Questions and Support' started by Nuno, Oct 18, 2015.

  1. Nuno

    Nuno 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.

  2. Nuno

    Nuno 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..

Share This Page