How long will blackberries keep in the refrigerator if they have been cooked with sugar and water added?
It depends. If you used at least 1/3 sugar to 2/3 berries ratio by weight AND let all the water cook off until it jellied a bit, you cooked a jam. It will last for weeks to months to years, and the first spoilage will be mold, which is visible. 

If you either used less sugar or did not cook out the water completely, it was not preserved and the shelf life is like that of any other cooked food, 3 to 5 days in the fridge.