I'll go the other way and suggest you post your code and the error. If I was to post code to do this, I'd just be posting a copy of the code in one of the plugins that you probably looked at.
If you want to look at a plugin, I suggest looking at Count Pages. From memory, it is up to date with the best way to update a custom column.
|