Open
ppa.launchpad.net/ondrej/php/ubuntu/pool/main/p/php7.1 and see what is there.
There
php7.1-mysql_7.1.12-2+ubuntu17.10.1+deb.sury.org+2_amd64.deb
And you want to receive:
php7.1-mysql_7.1.12-1+ubuntu17.10.1+deb.sury.org+1_amd64.deb
Therefore, you did not update the list of packages in the repositories and thus trying to get the old version of the package has already been uninstalled.
You need to do apt-get update, aptitude update, apt update - depends on what you use.