Hi,
I tried to display the data from the database in table. The following is the flow:
[{"id":"6e94e3b6.53c1ec","type":"mui_template","z":"ada4ecf1.32178","group":"119d1a72.024226","name":"","order":2,"width":"30","height":"3","format":"<style>\n td { text-align: center; }\n td * { display: inline; }\n</style>\n\n<table border=\"2\" width=\"100%\" height=\"100%\">\n\t<tr>\n\t\t<th>ID</th>\n\t\t<th>Code</th>\n\t\t<th>Description</th>\n\t\t<th>Location</th>\n\t\t<th>Type</th>\n\t\t<th>Owner</th>\n\t\t<th>IP Address/Port</th>\n\t\t<th>Port</th>\n\t\t<th>Process Code</th>\n\t</tr>\n\n\t<tr ng-repeat=\"x in msg.payload | limitTo:100\">\n <td>{{$index}}</td>\n\t\t<td>{{msg.payload[$index].name}}</td>\n\t\t<td>{{msg.payload[$index].description}}</td>\n\t\t<td>{{msg.payload[$index].location}}</td>\n\t\t<td>{{msg.payload[$index].type}}</td>\n\t\t<td>{{msg.payload[$index].owner_id}}</td>\n\t\t<td>{{msg.payload[$index].ip_address}}</td>\n\t\t<td>{{msg.payload[$index].ip_port}}</td>\n\t\t<td>{{msg.payload[$index].process_code}}</td>\n\t</tr>\n</table>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":780,"y":80,"wires":[[]]},{"id":"e9894158.47f85","type":"debug","z":"ada4ecf1.32178","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":670,"y":160,"wires":[]},{"id":"e5a864e2.67a728","type":"mysql","z":"ada4ecf1.32178","mydb":"272ea16.4569d5e","name":"database","x":540,"y":80,"wires":[["6e94e3b6.53c1ec","e9894158.47f85"]]},{"id":"97f4379b.97bcd8","type":"function","z":"ada4ecf1.32178","name":"select-query","func":"msg.topic=\"SELECT name,description,location,type,owner_id,ip_address,ip_port,process_code FROM machine2 WHERE name='\" + msg.payload + \"'\"; \nreturn msg;","outputs":1,"noerr":0,"x":430,"y":160,"wires":[["e5a864e2.67a728"]]},{"id":"22958033.b43cb","type":"mui_text_input","z":"ada4ecf1.32178","name":"name","label":"Search Machine","group":"119d1a72.024226","order":1,"width":"5","height":"1","passthru":true,"mode":"text","delay":300,"topic":"name","x":130,"y":160,"wires":[["a8bc7de7.67385"]]},{"id":"a8bc7de7.67385","type":"msg-resend","z":"ada4ecf1.32178","interval":5,"intervalUnit":"secs","maximum":"1000000","bytopic":false,"clone":true,"firstDelayed":false,"addCounters":false,"highRate":true,"outputCountField":"","outputMaxField":"","name":"","x":270,"y":160,"wires":[["97f4379b.97bcd8"]]},{"id":"d06faf57.95ca6","type":"inject","z":"ada4ecf1.32178","name":"","topic":"","payload":"","payloadType":"date","repeat":"5","crontab":"","once":true,"onceDelay":0.1,"x":130,"y":80,"wires":[["2f371afa.933966"]]},{"id":"2f371afa.933966","type":"function","z":"ada4ecf1.32178","name":"select-query","func":"msg.topic=\"SELECT name,description,location,type,owner_id,ip_address,ip_port,process_code FROM machine2 order by id desc limit 1\"; \nreturn msg;","outputs":1,"noerr":0,"x":330,"y":80,"wires":[["e5a864e2.67a728"]]},{"id":"119d1a72.024226","type":"mui_group","z":"","name":"mGroup 3","tab":"c6b47aa.71d9788","order":3,"disp":false,"width":"30","collapse":false},{"id":"272ea16.4569d5e","type":"MySQLdatabase","z":"","host":"10.21.11.15","port":"3306","db":"i4inari","tz":""},{"id":"c6b47aa.71d9788","type":"mui_tab","z":"","name":"I4Inari","icon":"home","order":1}]
Thanks for helping.