knolleary,
Thanks, but I fear that is one (just checked) that just doesn't work.
See code:
[{"id":"eb329916.3fbb8","type":"inject","z":"1d001802.89402","name":"Go","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":90,"y":80,"wires":[["b0e7ccc.17f343"]]},{"id":"b0e7ccc.17f343","type":"function","z":"1d001802.89402","name":"INSERT Bind","func":"msg.topic = \"INSERT INTO test (id,text) VALUES (?,?)\";\nmsg.payload = [2, \"This is a funny world's end\"];\nreturn msg;","outputs":1,"x":285,"y":81,"wires":[["953e765a.26117"]]},{"id":"953e765a.26117","type":"sqlite","z":"1d001802.89402","mydb":"74998355.c5df7c","sql":"","name":"Test DB","x":603,"y":112,"wires":[["e5e8ccf0.71cce"]]},{"id":"e5e8ccf0.71cce","type":"debug","z":"1d001802.89402","name":"","active":true,"console":"false","complete":"false","x":691,"y":212,"wires":[]},{"id":"33dd4497.bebbf4","type":"inject","z":"1d001802.89402","name":"Go","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":88,"y":132,"wires":[["c4905d83.863d1"]]},{"id":"c4905d83.863d1","type":"function","z":"1d001802.89402","name":"INSERT Old","func":"msg.topic = \"INSERT INTO test (id,text) VALUES (3,'Directly in topic')\";\nreturn msg;","outputs":1,"x":267,"y":136,"wires":[["953e765a.26117"]]},{"id":"9a148cf2.7a5628","type":"inject","z":"1d001802.89402","name":"Go","topic":"","payload":"funny","payloadType":"string","repeat":"","crontab":"","once":false,"x":107,"y":296,"wires":[["9542d9ab.3f1618"]]},{"id":"9542d9ab.3f1618","type":"function","z":"1d001802.89402","name":"SELECT Old","func":"msg.topic = \"SELECT * FROM test WHERE text LIKE '%\" + msg.payload + \"%'\";\nreturn msg;","outputs":1,"x":334,"y":299,"wires":[["953e765a.26117"]]},{"id":"723342b4.34e0ac","type":"inject","z":"1d001802.89402","name":"INSERT Bind - via JSON","topic":"INSERT INTO test (id,text) VALUES (?, ?)","payload":"[4, \"This is a funny world's end\"]","payloadType":"str","repeat":"","crontab":"","once":false,"x":109,"y":197,"wires":[["521c83d.287f4fc"]]},{"id":"521c83d.287f4fc","type":"json","z":"1d001802.89402","name":"","x":309,"y":197,"wires":[["953e765a.26117"]]},{"id":"3dcfe3fc.a32aa4","type":"inject","z":"1d001802.89402","name":"Go \"funny\"","topic":"","payload":"%funny%","payloadType":"string","repeat":"","crontab":"","once":false,"x":103,"y":350,"wires":[["57629578.436a0c"]]},{"id":"57629578.436a0c","type":"function","z":"1d001802.89402","name":"SELECT Bind","func":"msg.topic = \"SELECT * FROM test WHERE text LIKE ?\";\nmsg.payload = [msg.payload];\nreturn msg;","outputs":1,"x":330,"y":353,"wires":[["953e765a.26117"]]},{"id":"1cdc3d9b.32f99a","type":"inject","z":"1d001802.89402","name":"Go \"world's\"","topic":"","payload":"%world's%","payloadType":"string","repeat":"","crontab":"","once":false,"x":107,"y":412,"wires":[["57629578.436a0c"]]},{"id":"7f7bb046.f7d28","type":"comment","z":"1d001802.89402","name":"Database messing about","info":"","x":640,"y":40,"wires":[]},{"id":"74998355.c5df7c","type":"sqlitedb","z":"","db":"/home/me/TEMP/test.sqlite"}]
When I run it (after editing the path to the database)
I press the top GO button and get this:
"Error: SQLITE_ERROR: no such table: test"
Sorry, but that has me stumped.
** NOTE **
The path is slight edited from /home/pi/.... to /home/me/..... as I am doing test work on my NUC and it has more ..... than the Pi and so is quicker to test.