#1 - forget what you are being told about jrdc2 and other frameworks allowing direct access to your infinity free service. infinity free does not allow it. the only thing infinity allows is php. period. so, either you change your host or you use php. period. the discusssion regarding jrdc2 in the context of infinity is irrelevant. ignore it.
#2 - as to where the php script goes, it depends on your service. in theory, php scripts can run from anywhere. you upload the script to your host. the host must have some instructions on your "dashboard" or "panel" or "file manager". (i had never heard of infinity, but when i saw it was free and that they apparently offer the world for free, i signed up! it never hurts to have something in reserve.) the script you refer to looks pretty typical, and it could run right out of the box. you just fill in the necessary identification. there are some more elementary examples out there.
#3 - after the script is in place, you just need to do an okhttp poststring to the php script on the server. the script talks to the database and sends the records back to you as a json string. you parse the string and display the records. the "poststring" part is the select constraint query (name='smith' or product='beer'). the php script formulates the query. you supply the constraint. the script does 1 thing and expects you to supply the correct constraint(s). if you want to do something different, you need a different script and a different poststring. and you need to know what the return data is supposed to look like. but you already know all this because you have been dealing with sql and your databased already. you'll be making the same sql query and getting the same data back. we're just doing it in a way that infinity will allow you to do it. if you've never used okhttp before, you should start there first and practice downloading a page from your service (just some small html page), so you see how that works. here is the standard starter:
https://www.b4x.com/android/forum/threads/b4x-okhttputils2-with-wait-for.79345/#content