Results 1 to 4 of 4
Related
-
mysql & php new line problem Forum: PHP Forum
Replies: 6 -
Problem in mysql statement and if condition Forum: PHP Forum
Replies: 2 -
add timestamp into filename Forum: CGI Perl Forum
Replies: 1 -
mysql query / function problem.... Forum: Databases
Replies: 7 -
Perl dbi with mysql problem Forum: CGI Perl Forum
Replies: 1
-
08-28-2005, 11:12 PM #1
MySql problem --with -- mysqlimport and TIMESTAMP
I am running MySql 4.1 on Fedora Core 3
I have a script being kicked of by crontab that looks like this
[root@localhost] # mysqlimport --fields-terminated-by="," --lines-terminate-by="\r\n" --local databasename /path/nameoftable.restoffilename
The file "nameoftable.restoffilename" has 12 fields of data in it which are seperated by a comma. The MySQL
table has 13 fields of data in it. The 13th field of data is a field type "TIMESTAMP" NULL. (note i have also tried NOT NULL).
When the data imports into my table the 13th field always appears as 0000-00-00 00:00:00
Does anyone know how i can get the timestamp field to populate its field with the timestamp of when the record was added????????
I HAVE BEEN AT THIS ONE FOR DAYS....
Does anyone have a clue???
-
08-29-2005, 10:06 AM #2
Re: MySql problem --with -- mysqlimport and TIMESTAMP
do you have anymore code to show us?
-
08-29-2005, 10:29 AM #3
Re: MySql problem --with -- mysqlimport and TIMESTAMP
Thanks for you reply... the exact code is as follows:
[root@localhost]# mysqlimport --fields-terminated by="," --lines-terminated-by="\r\n" --local s8700 /mnt/winbox/ds1_f.batonrouge_08A10A
This imports a file from /mnt/winbox/ - The file is called ds1_f.batonrouge_08A10A.
The table its imported into is ds1_f in database s8700.
The file being imported has 12 columns which are seperated by a comma. My table has 13 columns. The 13th columns has these properties.
Field date_added
Type timestamp
Collation latin1_swedish_ci
Null YES
Default \N
-
08-29-2005, 11:03 AM #4
Re: MySql problem --with -- mysqlimport and TIMESTAMP
sorry, i cant help with this problem, due to little knowledge about sql
sry
Cloudjiffy- PaaS for Developers
10-05-2020, 12:30 AM in Web Hosting Forum