Php Get Url Parameter If Exists Sql