Jul. 14th, 2010

nonethefewer: (Default)
PHP/MySQL question.

There is a tab-separated file that contains, among other things, true/false values.

I run this from the command line:

mysqlimport -v --fields-terminated-by='\t' --fields-optionally-enclosed-by="'" --lines-terminated-by='\n' --user=user --password=password dbname filename.csv

The true/false values are updated fine.

I do the exact same damn thing from PHP, and all true/false columns are set to false.

What gives?

[eta] Same if I run this in PHP:

mysql_query("LOAD DATA INFILE '$file' INTO TABLE table_name FIELDS TERMINATED BY '\t' ENCLOSED BY \"'\" LINES TERMINATED BY '\n'");

WRYYYYYYYy
nonethefewer: (Default)
PHP/MySQL question.

There is a tab-separated file that contains, among other things, true/false values.

I run this from the command line:

mysqlimport -v --fields-terminated-by='\t' --fields-optionally-enclosed-by="'" --lines-terminated-by='\n' --user=user --password=password dbname filename.csv

The true/false values are updated fine.

I do the exact same damn thing from PHP, and all true/false columns are set to false.

What gives?

[eta] Same if I run this in PHP:

mysql_query("LOAD DATA INFILE '$file' INTO TABLE table_name FIELDS TERMINATED BY '\t' ENCLOSED BY \"'\" LINES TERMINATED BY '\n'");

WRYYYYYYYy

Originally posted on Dreamwidth.  Number of comments so far: comment count unavailable

February 2022

S M T W T F S
  12345
6789101112
13141516171819
20212223242526
2728     

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 7th, 2025 02:26 pm
Powered by Dreamwidth Studios