6. Saving Data in DB(MySQL)

6. Saving Data in DB(MySQL)

Postby Jasmine » Wed Jan 07, 2015 10:35 am

This video below contains a brief explanation and a simple application for those who are new to Sollae Systems’ PHPoC programmable devices.

We will go through the test how to save temperature data in DB by using a MySQL library.
you need MySQL DB server to be ready as well as creating a DB, table and so on for the test.

A DB called <em>temperature</em> with two colums: check_time(Primary key), temperature was already created.
check_time is the time to save at DB and temperature is current temperature.
Process Diagram

amy_5.png (85.49 KiB) Viewed 43 times

When temperature data is over 21 degree, an E-mail will be sent through the Google mail server.
To get the account authorization from the mail server, we will use "Extended SMTP" protocol.

Sample Source & Library
You need sample source and library to try application in the video.
Go to PHPoC Forum to download it.

- sn_mysql.php (Library)
- mysql_insert.php (Sample Source)
- Previous Result Source: esmtp_output (15.74KB)

Tutorial Video
※ Watch this video with 720p(HD) for best screen quality.

phpBB [video]

Result Source
Firmware v1.0.0: DBMySQL_output (20.15 KB)
New Firmware v1.1.0:
(22.68 KiB) Downloaded 246 times

PHPoC Tutorial
1. PHPoC Development Preparation
2. Transformation of Serial Data
3. User's Environment Variable Setup through the Web
4. Data Analysing through Debugging
5. Sending Email when an Event Occurs
6. Saving Data in DB(MySQL)
7. Real-time monitoring using Websocket
Last edited by Jasmine on Mon Feb 05, 2018 4:49 pm, edited 1 time in total.
Posts: 7
Joined: Fri Jan 02, 2015 2:08 pm

Re: 6. Saving Data in DB(MySQL)

Postby WesBorland » Fri Sep 08, 2017 8:39 pm

Very interesting stuff, thanks for posting!
Online gaming is my cup of tea. I just want to win daily, but first I have to study few helpful resources. I think there's something wrong with my strategy.
Posts: 1
Joined: Thu Aug 17, 2017 10:04 am

Re: 6. Saving Data in DB(MySQL)

Postby Jasmine » Mon Sep 11, 2017 11:56 am

I am glad to know that it's helpfull for you! :)
Posts: 7
Joined: Fri Jan 02, 2015 2:08 pm

Return to Tutorial Video

Who is online

Users browsing this forum: No registered users and 1 guest