SQL: How to get depth from a recursive cte

If you need to know what level deep you are when recursing through a series of parent child relationships, there is a pretty easy way. DECLARE @Folders TABLE ( ID INT NOT NULL, FolderTypeLID INT NOT NULL, Depth INT NOT NULL,SortOrder INT NOT NULL ); WITH cteFolder( FolderID,Depth ) AS ( SELECT @topFolderID,Depth = 0 […]

WordPress Plugin Updates Fails in IIS 7. Locks folder after delete and requires an IIS restart to release file locks

I was trying to update the plugins on my WordPress blog today, and it failed….again and again…and again. I was used to the auto update not working. So much so, I always backup my plugins folder, try and then replace the old version and carry on. Well today, I was fed up and wanted to […]