Update index.php

Fixed issue with sql query.