Fix missing PDO prepare statement on dynamic dashboard