| Message |
|
lse123
Developer
Joined: 23 May 2007
Posts: 68
2391 Cash
|
 I have a table at phpMyadmin and an excel file I want to upl
I have a table at phpMyadmin (Mysql) and an excel file , well I want to upload/import the data to the database table , what to do ? the columns in the db table are the same order as these of the excel spreedsheet ....What if in the excel file I have some special characters like commas, colons, semicolons ?
How to save hence appear a message that some modifications will happen if save(automatically by excel) ?
|
| Mon Nov 26, 2007 1:29 pm |
|
 |
|
|
142TeeTH
Trainee Developer
Joined: 26 Nov 2007
Posts: 8
240 Cash
|
First step would be to save your current database. From there, make sure it's saved as a CSV file, and upload via phpMyAdmin. The parsing usually goes well, so there should be little to worry about.
|
| Tue Nov 27, 2007 12:10 pm |
|
 |
lse123
Developer
Joined: 23 May 2007
Posts: 68
2391 Cash
|
"First step would be to save your current database" in excel ? How in excel setup 'FIELDS ENCLOSED BY '"' ' ? How I export a file in excel as csv to use to import data in a db table ? what to insert for FIELDS ENCLOSED BY in excel ? ' or " ? What excel can do(FIELDS ENCLOSED BY ), can be configured in excel ? What if I have special characters in an excel cell like commas , can i export as comma separated value - csv file ? the below is valid row in csv get from excel:
'xxxxx','nnn,mmm','kkkkk:c','hh(jj)ll-ooo89',99999
|
| Wed Nov 28, 2007 6:31 am |
|
 |
lse123
Developer
Joined: 23 May 2007
Posts: 68
2391 Cash
|
 is the privilege how make this error, or ?
I try to save excel file as csv and import to phpMyAdmin: but excel says there will be some changes de to special char ...I save anyway . what to insert for ENCLOSED BY '"' ? ' or " ? What excel can do, can be configured in excel the ENCLOSED BY ? below appear when I went to import the file csv:
Code:Error
SQL query:
LOAD DATA INFILE '/tmp/phpuGokyx' REPLACE INTO TABLE `copy`
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
ESCAPED BY '\\'
LINES TERMINATED BY '\r\n'
MySQL said:
#1045 - Access denied for user 'db1test123'@'%' (using password: YES)
is the privilege how make this error, or ?
|
| Wed Nov 28, 2007 6:45 am |
|
 |
mofomikeman
Junior Developer
Joined: 15 Feb 2006
Posts: 29
 714 Cash
|
|
| Thu Dec 13, 2007 7:55 am |
|
 |
lse123
Developer
Joined: 23 May 2007
Posts: 68
2391 Cash
|
 I make it, I choose as separators[in phpmyadmin]
I make it, I choose as separators[in phpmyadmin]:
,
"
\
AUTO
for a csv. just i didn't know what to choose for " ...
|
| Thu Dec 13, 2007 8:13 am |
|
 |
mofomikeman
Junior Developer
Joined: 15 Feb 2006
Posts: 29
 714 Cash
|
That software should do it for you.
|
| Thu Dec 13, 2007 8:18 am |
|
 |
|
|
lse123
Developer
Joined: 23 May 2007
Posts: 68
2391 Cash
|
Yes but in phpmyadmin I insert: ' so i get the error ....excel can configue as of " or ' for
FIELDS ENCLOSED BY ?
|
| Thu Dec 13, 2007 8:25 am |
|
 |
mofomikeman
Junior Developer
Joined: 15 Feb 2006
Posts: 29
 714 Cash
|
lse123 wrote:Yes but in phpmyadmin I insert: ' so i get the error ....excel can configue as of " or ' for
FIELDS ENCLOSED BY ?
Uhh... huh?
|
| Fri Dec 14, 2007 10:45 am |
|
 |
lse123
Developer
Joined: 23 May 2007
Posts: 68
2391 Cash
|
 Well excel can be configured as of " or ' for FIELDS EN
Well excel can be configured as of " or ' for FIELDS ENCLOSED BY ? YES/NO ?
|
| Sun Dec 16, 2007 10:07 am |
|
 |
phpadam44
Senior Developer
Joined: 27 Apr 2007
Posts: 150
Location: United States  1264 Cash
|
you could do this semi-manually if it's not too large.
_________________ http://www.phpgfx.com
|
| Mon Dec 17, 2007 4:17 pm |
|
 |
|
|