interesting but this is a script like the one I have?
select IgnoredUserID, COUNT(*) AS IgnoreCount
from (SELECT UserID,
NullIf(SubString(' ' + IgnoredUserIDs + ' ' , ID , CharIndex(' ' , ' ' + IgnoredUserIDs + ' ' , ID) - ID) , '') AS IgnoredUserID
FROM IgnoreTable, Tally
WHERE ID <= Len(' ' + IgnoredUserIDs + ' ') AND SubString(' ' + IgnoredUserIDs + ' ' , ID - 1, 1) = ' ') subq
group by IgnoredUserID
order by IgnoreCount desc
wth it's a temp ban? =(
MySQL returned an empty result set (i.e. zero rows). (Query took 0.0278 sec)PS:
Code:select IgnoredUserID, COUNT(*) AS IgnoreCount from (SELECT UserID, NullIf(SubString(' ' + IgnoredUserIDs + ' ' , ID , CharIndex(' ' , ' ' + IgnoredUserIDs + ' ' , ID) - ID) , '') AS IgnoredUserID FROM IgnoreTable, Tally WHERE ID <= Len(' ' + IgnoredUserIDs + ' ') AND SubString(' ' + IgnoredUserIDs + ' ' , ID - 1, 1) = ' ') subq group by IgnoredUserID order by IgnoreCount desc
Like I said originally, single SQL query rather than writing a script
MySQL returned an empty result set (i.e. zero rows). (Query took 0.0278 sec)
SQL query:
SELECT IgnoredUserID, COUNT( * ) AS IgnoreCount
FROM (
SELECT UserID, NullIf( SubString( ' ' + ignorelist + ' ', userid, substring_index( ' ', ' ' + ignorelist + ' ', userid ) - userID ) , '' ) AS IgnoredUserID
FROM usertextfield Tally
WHERE userid <= Length( ' ' + ignorelist + ' ' )
AND SubString( ' ' + ignorelist + ' ', userid -1, 1 ) = ' '
)subq
GROUP BY IgnoredUserID
ORDER BY IgnoreCount DESC
basically you take and make a new table called "tally"with the comma in there it just says 'unknown table, tally.'
this is mysql