Paul Hamilton wrote:
Step one was collecting the data, Step two is to somehow get the info into a
I am monitoring a serial port's CTS line, and need to get the fact that it's
changed state logged into the DB.
I can use C and/or PHP. Perl is beyond me :-( (I have trouble enough just
trying to add Perl modules).
This is OT for the FreeBSD lists. MySQL has several list where you'll have
more people subscribed who can help you.
However, it sounds like you want to use the MySQL C API. If you install the
MySQL client, the C API is included (if memory serves). All you have to do
is write your code to use it, and be sure to give the proper options to cc
when you compile to link in the MySQL libraries.
This page starts the docs on the MySQL C API.
The C program runs continuously, monitoring the CTS bit, so I thought it
would be nice to dump the info straight into the MySQL DB.
As a backup, I suppose, I could dump the 'date/time' and 'CTS-Open-Closed'
into a text file, then once a day, run a PHP script to import the files
contents into the MySQL DB. However, that means I wouldn't get any live
That sounds pretty clunky.
I know there is the MySQL++ project, but I had problems trying to get that
to function, and my C++ knowledge is negligible.
Any help, or tips would be grateful.
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message