This is a SQL to app interface

The code passes result of a PHP SQL query through Java script to a App inventor application running on a phone. It uses a special App Inventor Jave script feature called window.AppInventor.getWebViewString(), which allows App Inventor apps to communicate with the WebViewer component's internal processing of javascript.

Call this SQL query using syntax: https://sedwano.com/THPL-appinventor.php?sensor=sensor2001

Will try to get info from: sensor2001

Connected to SQL for {temp, humidity, atm pres, lux} from sensor2001. Running [SELECT temp, humid, pres, lux, batt, date, decHrs FROM sensor2001 WHERE id = (SELECT max(id) from sensor2001)]

SQL1: SELECT temp, humid, pres, lux, batt, date, decHrs FROM sensor2001 WHERE id = (SELECT max(id) from sensor2001)

SQL2: SELECT temp, humid, pres, lux, batt, date, decHrs FROM sensor2001 WHERE id = (SELECT max(id) from sensor2001 )

Got: {23.97, 52.7617, 0.99493,-0.000000045, 4.03333}

Updated on: 2026-07-18, at: 16.83.

Starting JAVA.

Allocated variables from SQL to AppInventor via PHP and Javascript