Databases :: MySql :: getting text into Mysql via serial port |
|||
| By: Squibi |
Date: 10/11/2004 00:00:00 |
Points: 125 | Status: Answered Quality : Excellent |
|
I would like to know if anybody has any ideas on how to get a text string inputted into my database. I have a system that pumps out a 10 character string followed by a <CR> on the serial RS232 port every few seconds. I would like to get this entered into a Mysql database running on a windows machine. The idea is to make it enter the text in one field and a unique ID in another followed by some kind of time stamp in a third field. I am hopefull this might be made alot easier by the string already having a <CR> at the end. Any Ideas? Regards Mike |
|||
| By: VGR | Date: 10/11/2004 15:55:00 | Type : Answer |
|
| yes, of course I've ideas. if PHP can not do this (I have to check communicating on the serial port ; it's perhaps possible), Then Delphi will do it ;-) I'm thinking of a lot of possibilities : -Delphi doing all the job (RS232+MySql) -Delphi handling RS232 and passing data directly to any MySql server via HTTP (an URI like <A HREF="http://yourdomain/addline?theline=">http://yourdomain/addline?theline=</A>"thedata_url_encoded" ) -Delphi handling RS232 and passing data to a local MySql server via similar request on <A HREF="http://localhost">http://localhost</A> (fastest, most reliable method) -Delphi handling RS232 and putting data in a textfile, imported later on the way you want [this is if you don't need the data "live" in the DB] -a PHP solution (never did it, and I'll try to escape COM as strongly as possible :D ) |
|||
| By: carchitect | Date: 12/11/2004 00:26:00 | Type : Assist |
|
| simple i suppose make a c program, read serial port in it which is simple and execute in it php script if you really wanna do it in php....may be a cron ob if it is sending data every 10 sec or so... regards |
|||
| By: carchitect | Date: 12/11/2004 00:28:00 | Type : Comment |
|
| read this http://in2.php.net/function.fopen http://in2.php.net/manual/en/function.fopen.php |
|||
| By: mquiroz | Date: 13/11/2004 01:25:00 | Type : Assist |
|
| hi miked260772! Hope you know a little of visual basic 'cause this post completly fits your needs... http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20632174.html |
|||
|
Do register to be able to answer |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








