Node red to database

hello all !
im trying to get the temperature value from a data base to node and this is my flow [{"id":"a68c4741.10f2b8","type":"tab","label":"Flow 3","disabled":false,"info":""},{"id":"9543390d.1e0c88","type":"debug","z":"a68c4741.10f2b8","name":"","active":true,"console":"false","complete":"false","x":750,"y":60,"wires":[]},{"id":"1f86ca6f.5599b6","type":"function","z":"a68c4741.10f2b8","name":"prepareHtml","func":"var temp = {};\nvar html = \"<table width='100%'><tr><td width='75%'>Date</td><td width='25%'>Température</td></tr>\";\nfor(var i in msg.payload)\n{\n temp = msg.payload[i];\n html += \"<tr><td>\"+temp.date+\"</td><td>\"+temp.temperature+\"</td></tr>\";\n}\nhtml += \"</table>\";\nmsg.payload = html;\nreturn msg;","outputs":1,"noerr":0,"x":610,"y":200,"wires":[["8e9915.95cf86e8","9543390d.1e0c88"]]},{"id":"8e9915.95cf86e8","type":"ui_template","z":"a68c4741.10f2b8","group":"18ee1f57.1d8f21","name":"","order":7,"width":"16","height":"6","format":"<div ng-bind-html=\"msg.payload\"></div>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":840,"y":160,"wires":[[]]},{"id":"8f377d12.67306","type":"inject","z":"a68c4741.10f2b8","name":"","topic":"SELECT * FROM temperature ;","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":"","x":160,"y":160,"wires":[["72fd4127.b3144"]]},{"id":"72fd4127.b3144","type":"mysql","z":"a68c4741.10f2b8","mydb":"20c84aa7.7b3e86","name":"MYSQL","x":400,"y":100,"wires":[["1f86ca6f.5599b6"]]},{"id":"18ee1f57.1d8f21","type":"ui_group","z":"","name":"Températures du processeur","tab":"bd5e44ed.c2ba68","order":5,"disp":true,"width":"24","collapse":true},{"id":"20c84aa7.7b3e86","type":"MySQLdatabase","z":"","host":"127.0.0.1","port":"3306","db":"analyse de la temperature","tz":""},{"id":"bd5e44ed.c2ba68","type":"ui_tab","z":"","name":"BDD","icon":"dashboard"}]
it is supposed to look like this


but it is like this
any one can help me pls

use 3 backticks `

flow code

3 backticks again `

If it is undefined, it is undefined, so you have to check what the input is.

My first suggestion would be to put a debug node on the output of the mysql node and see what you are getting back