Re: Importing data in to mysql with some control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, April 16, 2007 12:43 am, Richard Kurth wrote:
> I am trying to write a import script for loading data into an existing
> mysql
> table. I want to show the import data on the screen and let the user
> select
> the column number to go with which mysql field. Now some of the fields
> are
> mandatory like firstname lastname email address and so on...........
> But
> some of the fields might be custom fields these would be stored in a
> different table and the mysql fields would be custom1 custom2
> .........   So
> the user would select what column go's with which field. No I know
> that some
> of this would have to be done server side. So I was thinking of using
> Ajax
> or just JavaScript. Does anybody know of any examples that show
> something
> like this being done. The only examples I have seen just shows data
> being
> imported into the database form csv file with out choosing where the
> data
> should go. It has to be in order when you run the script. Any ideas on
> where
> to look and how to get this started.

I had to do something similar for a mailing list import thingie once...

Back in PHP 3.0.12 days, according to my comments in the source I've
just located and uploaded for ya:
http://www.l-i-e.com/listbaby/

Huge grain of salt here, as it was one of my earlier projects and it
never went into production.  Well, actually, the shmrsh php script to
be a mailing list admin went live, but not the GUI bit.

I basically added a second table that stored any "extra" fields the
user chose with their own fieldnames as just another column in the DB.

FileMaker has a nice import that does this if you import CSV files. 
You may want to take a look at that if you know anybody who has
filemaker.

You also may want to consider allowing the user to "compbine" two or
more of their fields (firstname + lastname) into one of your fields.

Maybe even let them "split" a field into two according to some basic
rule on where to split.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux