System constist of three parts:
- MySQL database
- PHP interface for
managing MySQL database
- C languagae daemon
The main target for it is making some
sequences of actions, when some
values in MySQL databases are found.
You can give many rules in one sequence. Daemon logs into specified DB
and executes given SQL. If SQL from all rules give some results,
actions are executed.
SQL text in each action consist of two or more parts:
- SQL query
- "{" char and SQL action
System logs into specified DB and makes SQL
query. Later logs again into DB (it can be different) and executes SQL
action for each result returned from SQL query (if you want to enter
value of 1'st column from SQL query, use "daemon_column1", for
second use "daemon_column2", etc.). Point 2 can repeat. Example:
select txt from a where txt='wartosc'
{
insert into b (bzzz) values ('daemon_column1')
{
insert into b (bzzz) values ('2')
System makes "select txt from a where txt='wartosc'" and for
each result makes "insert into b (bzzz) values ('daemon_column1')"
(instead of daemon_column1 there is entered txt column
values) and "insert into b (bzzz) values ('2')"
You can use it for sending SMS in Gammu style.