Date: Thu, 16 Jan 2003 15:56:48 +0800 From: "Paul Hamilton" <paul@computerwest.com.au> To: <freebsd-questions@FreeBSD.ORG> Subject: How can data be inserted into a MySQL DB using C code? Message-ID: <AGEHIFHGNEMPFNCPLONMAENJEBAA.paul@compwest.com.au> In-Reply-To: <20030115112042.GA26041@gothmog.gr>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi All, Step one was collecting the data, Step two is to somehow get the info into a MySQL DB. 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). 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 data. 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. Cheers, Paul Hamilton To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AGEHIFHGNEMPFNCPLONMAENJEBAA.paul>