# Mysql - app - SOLVED

**URL:** <https://community.homey.app/t/mysql-app-solved/12842>\
**Category:** Apps\
**Created:** [May 8, 2019, 3:24pm UTC](https://community.homey.app/t/mysql-app-solved/12842 "2019-05-08T15:24:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kalle\_Kronbeck](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kalle_kronbeck/32/13158_2.png) [@Kalle\_Kronbeck](https://community.homey.app/u/Kalle_Kronbeck)\
**Post date:** [May 8, 2019, 3:24pm UTC](https://community.homey.app/t/mysql-app-solved/12842/1 "2019-05-08T15:24:12Z")

</div>

I have 10 years of energy measures in a MYSQL database.  
I downloaded this app but dont get it to work. Dont see any numbers.

[https://apps.athom.com/app/nl.rebtor.sql](https://apps.athom.com/app/nl.rebtor.sql)  
The query I am using looks like this.  
SELECT counts\_a\_60 AS ‘power’, counts\_a\_24 AS ‘meter’ FROM answers a ORDER BY Created DESC LIMIT 1;

I can test my sql statement in query browser and it returns values ok, see picture

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/e/e3dba4f8bb5e37fedb5003ad535100f3df5b1a8c.png)

---

<div class="post-metadata">

**Author:** ![Kalle\_Kronbeck](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kalle_kronbeck/32/13158_2.png) [@Kalle\_Kronbeck](https://community.homey.app/u/Kalle_Kronbeck)\
**Post date:** [May 11, 2019, 6:57am UTC](https://community.homey.app/t/mysql-app-solved/12842/2 "2019-05-11T06:57:02Z")

</div>

I now got it working. And I think it was something when entering query in the app on my Iphone. Because when I logon [http://developer.athom.com/](http://developer.athom.com/) and added the device there and copy/paste the query and other fields it starts working. So maybe some characters got wrong when writing it on my iphone.

---

<div class="post-metadata">

**Author:** ![Soap](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/soap/32/33981_2.png) [@Soap](https://community.homey.app/u/Soap)\
**Post date:** [May 27, 2021, 9:05am UTC](https://community.homey.app/t/mysql-app-solved/12842/3 "2021-05-27T09:05:28Z")

</div>

Just like TS I have several sensors stored in a SQL server.  
(OneWire temperature sensors)  
I would like to get some of the sensors into my homey.  
but I cant get it working.  
This is the string I am using.  
SELECT Fahrenheit AS ‘temp’ FROM `digitemp` WHERE `SerialNumber` LIKE ‘106785F501080089’ ORDER BY `time` DESC LIMIT 1;

The string works just fine when running it manually as a SQL query

I am only intrested in the last logged temperature but I get no value in my homey.  
Any suggestions?
