Hi all,
I'm having trouble with the following line of code in my php script:
$result = mysql_query('LO AD DATA LOCAL INFILE "NYSE_".$today. ".txt"
INTO TABLE main FIELDS TERMINATED BY "," LINES TERMINATED BY ","');
I've tested $today and it gives the correctly formatted date. And when
I hard code the file name, the mysql database is filled as
advertised...ev erything is fine. But I've tried every variation of
date variable I can think of and it fails. Well, actually no error,
but the above line of code doesn't seem to run because the table stays
empty.
'$today' is required because the file name changes each day and has the
current date in its name. (code -> $today=date("ym d"); <- )
Thanks for your help!
Jim
I'm having trouble with the following line of code in my php script:
$result = mysql_query('LO AD DATA LOCAL INFILE "NYSE_".$today. ".txt"
INTO TABLE main FIELDS TERMINATED BY "," LINES TERMINATED BY ","');
I've tested $today and it gives the correctly formatted date. And when
I hard code the file name, the mysql database is filled as
advertised...ev erything is fine. But I've tried every variation of
date variable I can think of and it fails. Well, actually no error,
but the above line of code doesn't seem to run because the table stays
empty.
'$today' is required because the file name changes each day and has the
current date in its name. (code -> $today=date("ym d"); <- )
Thanks for your help!
Jim
Comment