Quote:
Originally Posted by chikuru
You know the query to run the refs counts? or where can I find it?
|
[sql]UPDATE filedata
LEFT JOIN (
SELECT filedataid, COUNT(attachmentid) AS actual
FROM attachment
GROUP BY filedataid
) list USING (filedataid)
SET refcount = IFNULL(actual, 0)
WHERE refcount <> IFNULL(actual, 0)[/sql]
You'll need to add the table prefix to the table names if your setup uses them. Also as I noted for this query to work the filedata and attachment tables need to be in their pre-upgraded state. Your other option is to reset to 4.2.2 and wait for the 4.2.4 upgrade which includes the above query in the upgrade process.
The query was posted at
http://www.vbulletin.com/forum/forum...17#post4330417