To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > PHP Help > Code Critique

Code Critique Having someone critique your code is always a great way to hone the skills. Stop in and post your code to see what your peers may have done differently.

Reply
 
Thread Tools Rate Thread Display Modes
Old 12-02-2003, 11:34 PM   #1
planetsim
code | beer > sleep
 
Join Date: Sep 2002
Location: aus
Posts: 4,826
CSV to MySQL

Just a little thing i made that allows you to select a database, a table within the database, upload a .csv File and add it to that table.

Its not pretty but give me your comments on what should be added.
Attached Files
File Type: zip csv2mysql.zip (2.2 KB, 444932 views)
__________________
Dont be lazy Search
And use the Manual
Webmobo - Open Source News Script | Portfolio / Blog | Against TCPA
planetsim is offline   Reply With Quote
Old 02-03-2004, 10:34 PM   #2
f8ball
Member
 
Join Date: Feb 2003
Posts: 38
Says there's too many fields, but they are the same. Also curious if you have the option of changing the delimiter and if it erases the current info or just adds to it. Pretty smooth otherwise.
__________________
f8ball ::::::::::::::::::::::::::::::::::::::::::::
f8ball is offline   Reply With Quote
Old 02-04-2004, 05:24 PM   #3
planetsim
code | beer > sleep
 
Join Date: Sep 2002
Location: aus
Posts: 4,826
Hey thanks for your feedback. it was a quick thing i made when i needed to get a CSV file from a client with over 10000records so its messy and was only meant for that situation.

On the other hand where is this too many fields error coming into it, its been a while since ive been required to use this..
__________________
Dont be lazy Search
And use the Manual
Webmobo - Open Source News Script | Portfolio / Blog | Against TCPA
planetsim is offline   Reply With Quote
Old 02-04-2004, 07:13 PM   #4
f8ball
Member
 
Join Date: Feb 2003
Posts: 38
I'll have to check it again tonight. I think what's going on is my CSV has a tiny blob w/a comma in it and the script thinks that means a new field has formed .. so it moves everything over and then I get the error that the fields don't match up.
__________________
f8ball ::::::::::::::::::::::::::::::::::::::::::::
f8ball is offline   Reply With Quote
Old 02-04-2004, 10:15 PM   #5
planetsim
code | beer > sleep
 
Join Date: Sep 2002
Location: aus
Posts: 4,826
Ill probably make it a class if i get time to update it will probably fix that error, and yes i see what you mean as well.
__________________
Dont be lazy Search
And use the Manual
Webmobo - Open Source News Script | Portfolio / Blog | Against TCPA
planetsim is offline   Reply With Quote
Old 02-08-2006, 06:07 PM   #6
ceo4u
Junior Member
 
Join Date: Feb 2006
Posts: 2
csv2mysql

Here's a great site to help with converting from CSV to MySQL >>>

www.ceo4u.com/data
ceo4u is offline   Reply With Quote
Old 02-13-2006, 11:39 PM   #7
bpat1434
NMaOtBG
 
bpat1434's Avatar
 
Join Date: Oct 2004
Location: Around 255.255.255.0
Posts: 8,093
nothing like dredging up an old topic.... two years old.....
but otherwise pretty nice....
bpat1434 is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 04:31 PM.






Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.