I have a query I had to rewrite due to client moving servers. My function that worked fine on mysql did not work on MAriaDB which was what new server had. Thanks goodness for custom queries that were added to Wappler recently.
My custom query calculates distances between location selected on a page and the employers display in the results sorted by nearest to selected location to furthest.
Everything works fine on my local server that uses the live db, but the query does not “get” the lat and long values to make a calculation on the live server. I have checked that needed files are uploaded, but somewhere something is weirdly wrong. This site started on app connect/server connect on Dreamweaver and made the migration to Wappler for updates over the past 2+ years.
here is the page in question with the params already filled in the url:
So the query runs fine on my localhost. What it does:
Get lat and lon coordinates from two hidden fields that the google autocomplete fills. Calculates distance between all the employers and sorts them from closest to furthest. Seems like it does not use the Get variables on the live server and is then not able to do the calculations. are there any files I maybe missed in my upload generated by the custom query on server connect? File attached.
Ok, seems like all my writing apparently does not explain that the results are different between local and live. Is there anything else I can provide or explain to help you understand that the results live are wrong in that they are not sorted because calculation on custom query is not doing what it should?
I don’t know what the results should be, I only notice that it is returning results. I also see distance being filled in the results from the server connect call.
If you think get vars (hidden fields) are not being used / set correctly why not put them in two setvalue steps to see what they return in the dev tools when the server action runs?