Update reference.php

Added db functionality.