SQL to check how many sites a user is a member of

You could simply use the get_blogs_of_user() function:

echo count( get_blogs_of_user( $user_ID ) );

instead of your custom SQL query.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)