Page 5 of 5
Re: Populating MySQL database function.
Posted: Wed Nov 15, 2023 2:27 pm
by RGV250
Hi,
To start with it will only be one message every 5 seconds or so but later may end up with 15 so still only 3 / sec average.
Bob
Re: Populating MySQL database function.
Posted: Thu Nov 16, 2023 11:35 am
by LeighM
Just to add another piece to the jigsaw puzzle and good work from chipfryer27
Here's a demo of the capabilities of GNU/Linux and Flowcode.
This script will install mysql and create a demo database and table.
Edit the user 'leigh' to your login account and download it to your Raspberry Pi.
In the terminal (or putty, ssh), make the file executable (chmod 777 setup_db.txt) and run it (./setup_db.txt)
Similarly, this script can be used to test the DB and data insert.
And here is a demo Flowcode project that records temperature measurements to the test DB.
Hope it helps, at least it will get you started with SQL statements.

Re: Populating MySQL database function.
Posted: Thu Nov 16, 2023 12:40 pm
by chipfryer27
Hi Leigh
Thanks for the above.
I'm creating a little guide regarding this and Bob is helping proof read. It will show how to create a DB and tables, then the steps to create a script that will update tables etc. Then a Flowcode example that updates.
Interesting to see your use of script, different to mine but then you are after all a Guru
Regards
Re: Populating MySQL database function.
Posted: Sun Nov 19, 2023 8:57 pm
by RGV250
Hi Martin,
Apologies for not replying earlier, I will have a play with your example later, I have been spending a lot of time with the example from Chipfryer and the brain cell cannot handle more than one thing at a time.
Bob
Re: Populating MySQL database function.
Posted: Wed Nov 22, 2023 1:31 pm
by RGV250
I should have mentioned Leigh in the post above, I was thinking of Martin in a different post
I have just managed to modify chipfryers example to run on a Raspberry Pi from the other post and simulate it with everything on the same PC so this will come in very handy when I test it out on the actual Raspberry Pi hardware.
Regards,
Bob
Re: Populating MySQL database function.
Posted: Wed Nov 22, 2023 1:55 pm
by chipfryer27
Hi
I updated the guide
viewtopic.php?f=3&t=2248 to include latest MySql and PHP.
Regards