Wow, this is unbeileivable. Your test script fails with the attached csv where
column `a` in blank too!
Php.ini
http://pastie.org/4340845
mysql> select * from `testBook1csv`;
+++
| id | field0 |
+++
| 1 | NULL |
| 2 | NULL |
| 3 | NULL |
| 4 | NULL |
| 5 |
No, it did not work.
mysql> show tables;
++
| Tables_in_mailList |
++
| testBook1csv |
++
1 row in set (0.00 sec)
mysql> select * from `testBook1csv`;
+++
| id | field0 |
+++
| 1 | NULL |
| 2 | NULL |
argh
forget that.
simply put the id auto_increment field *last* in the create table
defn, leave everything else as it was.
On Thu, Jul 26, 2012 at 10:38 PM, tamouse mailing lists
wrote:
> With one change to the data file to make the indexing work correctly
> and read all the fields: to accommodat
With one change to the data file to make the indexing work correctly
and read all the fields: to accommodate the first id auto_increment
field, the first value in the csv line must be null:
null.a,b,c,d,e
null,f,g,h,i,j
null,k,l,m,n,o
And further, the field count should subsequently be one less i
Brad, do take a look at http://pastie.org/4340383
It does work.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Drats, I think you are correct.
:)
-Original Message-
From: Karl DeSaulniers [mailto:[email protected]]
Sent: Thursday, July 26, 2012 5:59 PM
To: [email protected]
Subject: Re: [PHP-DB] PHP-DB] Re: No data?
Jim I believe your correct.
Upload the file to temp
move the file to your
Your method would work. H
Contemplating.
Brad
-Original Message-
From: Jim Giner [mailto:[email protected]]
Sent: Thursday, July 26, 2012 6:02 PM
To: Brad
Subject: Re: [PHP-DB] Re: No data?
actually, I never heard of LOAD DATA myself. But dont' think of my approach
Jim I believe your correct.
Upload the file to temp
move the file to your dir on your server
and rename file
you can also set the permissions of the file while moving it.
put url to file (not temp file) in database (not the file contents)
done
Best,
Karl
On Jul 26, 2012, at 4:50 PM, Brad wrote:
I apologize, I may have been mistaken about the role of $_FILES but this ->
http://dev.mysql.com/doc/refman/5.0/en/load-data.html confuses me. The use
of $_FILES with LOAD DATA is littered over the internet and manuals as a 1
shot deal. No hand off to another directory for storage till the next
fu
I don't 'have' a file. It creates a temporary file and then deletes it just
as fast in /tmp/.
Plus, how would I $_GET it? $_FILES is supposed to handle 'ALL' of this for
me? If not, what the heck does it do?
Brad Sumrall
NYCTelecomm.com
212 444-2996
-Original Message-
From: Jim Giner [m
Not sure what you mean - "Program reads array". What program is doing
is utilizing the FILES element to get the info about the uploaded file
and proceeds to finish the upload by moving it to a temporary folder of
your creation. Once that is done you HAVE the file under whatever name
you want
That would be a php.ini setting and I have no clue which [context] to look for
my friend.
From: tamouse mailing lists [mailto:[email protected]]
Sent: Thursday, July 26, 2012 4:11 PM
To: Brad
Subject: RE: [PHP-DB] No data?
I am sure the file is created. You need to look to see
1 User uploads file
2 program reads array
3 program creates a table called $memberID.$filename if not exist
($filename is column)
4 program uploads data into table/column
I am messed up at #2 for some reason so #4 fails.
All 'key's appear to be in their correct place so I don't know.
https://gi
Are you any closer to getting your solution to work yet? If not, could
I ask for the general concept again? From what I can remember, You want
to allow a user to upload a csv file which you will then put into a sql
table. Additionally your code seems to be creating a new table for each
file
The sql query is sound. The tmp_file is created correctly and can be viewed
live. It just does't hit the database. :(
-Original Message-
From: tamouse mailing lists [mailto:[email protected]]
Sent: Thursday, July 26, 2012 5:52 AM
To: Brad
Cc: [email protected]
Subject: Re: [PH
My brain went there in a hurry, hours ago my friend
http://tinypic.com/r/28mrm/6
now you should see why I am so confused
No error, but no data either. :(
Brad Sumrall
NYCTelecomm.com
212 444-2996
-Original Message-
From: tamouse mailing lists [mailto:[email protected]]
Sent: Thurs
16 matches
Mail list logo