PHP LOAD DATA LOCAL INFILE Realtime Update MySQL -
good evening, i having problems trying achieve in php/mysql. i have text file (in real time) taking 1 row of numbers i.e. 1.43 etc sensor on com port. information needs sent mysql pretty in real time. as test have used text document without real time using php load data local infile seems sending data mysql database. my question is, how send data 1 second, next second send latest information not on mysql database, otherwise have loads of duplicate data? my current code follows: <?php $username = "root"; $password = ""; $hostname = "localhost"; // connect database , table $dbhandle = mysql_connect($hostname, $username, $password) or die("unable connect mysql"); echo "connected mysql<br>"; $selectdatabase = mysql_select_db("data",$dbhandle) or die("could not select iwemsdata"); echo "connected iwemsdata<br>"; // text file read in $textfile = 'data.txt'; mys...