(I am sorry if this is the wrong group for this posting, I cant find a
group on usenet for phpmyadmin, but maybe someone would be nice enough
to answer me anyway....)
I need to import data into a simple table The table has three fields.
The first is an auto increment value, the second the current time and
date (the 14 character version), and a field with some data.
This works okay in SQL mode
INSERT INTO all_epst VALUES ('',NOW(),'infotest1');
INSERT INTO all_epst VALUES ('',NOW(),'infotest2');
Using phpmyadmin I want to import this data from a csv file rather
than the workaround of creating sql script
Trouble is I cant get "current timestamp" to work. When I click on
import in phpmyadmin I can choose "csv" or "csv mha"
I try csv and set
row end to ;
field surround to '
field seperator to ,
The txt file for csv import contains
'',NOW(),'infotest1';'',NOW(),'infotest2';
It imports the data and gives me the autoincrement value but the time
stamp is left as 0000-00-00 00:00:00
Feedback:
INSERT INTO `all_epst`
VALUES (
'', 'NOW()', 'infotest1'
)
INSERT INTO `all_epst`
VALUES (
'', 'NOW()', 'infotest2'
)
I tried another txt file with
'','','infotest1';'','','infotest2';
Again, it imports the data and gives me the autoincrement value but
the time stamp is left as 0000-00-00 00:00:00
VALUES (
'', '', 'infotest1'
)
INSERT INTO `all_epst`
VALUES (
'', '', 'infotest2'
)
Note that the tabel is correctly structered with "CURRENT_TIMESTAMP"
as the default. The attribute ("ON UPDATE CURRENT_TIMESTAMP" is not
applicable as I am adding new values, but is set anyway.)
What am I missing? How do I import with a csv text file using
phpmyadmin?
Any help greatfully appreciated
Garry Jones
Sweden 2 2217
"GarryJones" <mo****@algonet.sewrote in message
news:52**********************************@u69g2000 hse.googlegroups.com...
(I am sorry if this is the wrong group for this posting, I cant find a
group on usenet for phpmyadmin, but maybe someone would be nice enough
to answer me anyway....)
I need to import data into a simple table The table has three fields.
The first is an auto increment value, the second the current time and
date (the 14 character version), and a field with some data.
This works okay in SQL mode
INSERT INTO all_epst VALUES ('',NOW(),'infotest1');
INSERT INTO all_epst VALUES ('',NOW(),'infotest2');
Using phpmyadmin I want to import this data from a csv file rather
than the workaround of creating sql script
Trouble is I cant get "current timestamp" to work. When I click on
import in phpmyadmin I can choose "csv" or "csv mha"
I try csv and set
row end to ;
field surround to '
field seperator to ,
The txt file for csv import contains
'',NOW(),'infotest1';'',NOW(),'infotest2';
It imports the data and gives me the autoincrement value but the time
stamp is left as 0000-00-00 00:00:00
Feedback:
INSERT INTO `all_epst`
VALUES (
'', 'NOW()', 'infotest1'
)
INSERT INTO `all_epst`
VALUES (
'', 'NOW()', 'infotest2'
)
I tried another txt file with
'','','infotest1';'','','infotest2';
Again, it imports the data and gives me the autoincrement value but
the time stamp is left as 0000-00-00 00:00:00
VALUES (
'', '', 'infotest1'
)
INSERT INTO `all_epst`
VALUES (
'', '', 'infotest2'
)
Note that the tabel is correctly structered with "CURRENT_TIMESTAMP"
as the default. The attribute ("ON UPDATE CURRENT_TIMESTAMP" is not
applicable as I am adding new values, but is set anyway.)
What am I missing? How do I import with a csv text file using
phpmyadmin?
Any help greatfully appreciated
Garry Jones
Sweden
That's hard to figure out second-hand. My best suggestion is to eliminate
the "field surround" element, which you shouldn't need as long as the field
doesn't contain a comma. The feedback you got shows value 'NOW()', but
what you need (I think) is NOW() without single quotes around it. So I
suspect the field surround is supplying single quotes and then mysql is
reading it as a string rather than a function.
You also might try setting a default to NOW() instead of just relying on the
phpmydamin checkbox.
Another suggestion is to check the encoding of your source.
GarryJones wrote:
(I am sorry if this is the wrong group for this posting, I cant find a
group on usenet for phpmyadmin, but maybe someone would be nice enough
to answer me anyway....)
I need to import data into a simple table The table has three fields.
The first is an auto increment value, the second the current time and
date (the 14 character version), and a field with some data.
This works okay in SQL mode
INSERT INTO all_epst VALUES ('',NOW(),'infotest1');
INSERT INTO all_epst VALUES ('',NOW(),'infotest2');
Using phpmyadmin I want to import this data from a csv file rather
than the workaround of creating sql script
Trouble is I cant get "current timestamp" to work. When I click on
import in phpmyadmin I can choose "csv" or "csv mha"
I try csv and set
row end to ;
field surround to '
field seperator to ,
The txt file for csv import contains
'',NOW(),'infotest1';'',NOW(),'infotest2';
It imports the data and gives me the autoincrement value but the time
stamp is left as 0000-00-00 00:00:00
Feedback:
INSERT INTO `all_epst`
VALUES (
'', 'NOW()', 'infotest1'
)
INSERT INTO `all_epst`
VALUES (
'', 'NOW()', 'infotest2'
)
I tried another txt file with
'','','infotest1';'','','infotest2';
Again, it imports the data and gives me the autoincrement value but
the time stamp is left as 0000-00-00 00:00:00
VALUES (
'', '', 'infotest1'
)
INSERT INTO `all_epst`
VALUES (
'', '', 'infotest2'
)
Note that the tabel is correctly structered with "CURRENT_TIMESTAMP"
as the default. The attribute ("ON UPDATE CURRENT_TIMESTAMP" is not
applicable as I am adding new values, but is set anyway.)
What am I missing? How do I import with a csv text file using
phpmyadmin?
Any help greatfully appreciated
Garry Jones
Sweden
You're right - phpMyAdmin isn't supported on usenet. They have their
own forums on sourceforge.
That's where you should be asking.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attglobal.net
================== This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Steve Holden |
last post by:
This is even stranger: it makes it if I import the module a second time:
import dbimp as dbimp
import sys
if __name__ == "__main__":
dbimp.install()
#k = sys.modules.keys()
#k.sort()
#for...
|
by: Zak McGregor |
last post by:
Hi all
Are there any good solutions to aligning form field names and input boxes
without resorting to tables? I am struggling to do this nicely at the
moment.
Thanks
Ciao
Zak
|
by: news |
last post by:
Our production database in an exported textfil runs about 60 MB.
Compressed that's about 9 MB.
I'm trying to import the export into another machine running FC3 and
mySQL 11.18, and it appears as...
|
by: Ed_No_Spam_Please_Weber |
last post by:
Hello All & Thanks in advance for your help!
Background:
1) tblT_Documents is the primary parent transaction table that has 10
fields and about 250,000 rows
2) There are 9 child tables with...
|
by: Juris Krumins |
last post by:
Couple a weeks ago (19.08.03 Subject: Temporaty tables) I've posted message
with question about errors I'm getting while using create temporaty table
command.
So I'm start digging in src code as...
|
by: Neter Smith |
last post by:
I have run into a problem when trying to import a WSDL reference under VS
2003 and 1.1 of the framework. It appears as if it is in the generation of
the proxy that things are failing.
When I...
|
by: laredotornado |
last post by:
Hello,
My hosting company has MySQL 5 and so do I on my local Fedora Core 5
Linux machine. However, when I import a dump file from their
enviornment into mine, I get this error
ERROR 1064...
|
by: David Abrahams |
last post by:
I'm pretty comfortable with Python, but recently I'm constantly
finding mysterious issues with import. For example, looking at
...
|
by: grbgooglefan |
last post by:
I am importing cStringIO module in my PythonC++ embedded program.
The import is failing with the following error:
ImportError: /usr/lib/python2.3/lib-dynload/cStringIO.so: undefined
symbol:...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |