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 )
SELECT @topFolderID,Depth = 0
SELECT f.ID, Depth +1
FROM Folder f
JOIN cteFolder cte
ON f.ParentID = cte.FolderID
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 get everything up to date.
I changed filed permissions, I restarted IIS beforehand, I even tried using Jedi mind powers. It was all fruitless.
I finally was able to follow a nugget of information that led me to a bright person somewhere who said it was due to PHP caching. Well, since I don’t know very much about PHP (open source legacy wannabe script language), I figured, of course it was. I like to blame PHP, or anything that isn’t my own code for that matter.
The WinCache in PHP decides it likes the plugin folders a whole lot. So much so, it will never let them go. Until now, the fine fellows that designed the cache fixed their glitch.
Good luck and Happy Coding!