Webmaster Forum


Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Share |
  #1 (permalink)  
Old 04-09-2011, 02:32 AM
kos's Avatar
kos kos is offline
Coding Tiger
Latest Blog:
Happy New Year 2013

 
Join Date: 04-13-07
Location: .ro
Posts: 4,030
iTrader: 3 / 100%
csv to php to db

I have a very large, about 65.000 entries, csv file and I want to parse that file and build a query to insert that data into database. the problem is that when I tried to do it myself I got an out of memory exception; so I thought I was doing something wrong so I checked online for a php script and then I still got the same error (that happened when building the query).

Does anyone know a good csv parser?

tia
 
Reply With Quote
  #2 (permalink)  
Old 04-09-2011, 04:18 AM
kos's Avatar
kos kos is offline
Coding Tiger
Latest Blog:
Happy New Year 2013

 
Join Date: 04-13-07
Location: .ro
Posts: 4,030
iTrader: 3 / 100%
current status: I've find a class on php classes and finally was able to display the results.
the problem is that I don't have a csv file to get data from but an xls, which I have opened in excel and then export to csv which is the file that I parse with php but the output result is malformed and I can't tell if it's the xls or the excel's export feature that's causing this (see attachment)

*note: in Excel everything looks ok as afar as I can tell..

damn...
Attached Thumbnails
csv to php to db-clipboard01.jpg  
 
Reply With Quote
  #3 (permalink)  
Old 04-09-2011, 08:28 AM
kos's Avatar
kos kos is offline
Coding Tiger
Latest Blog:
Happy New Year 2013

 
Join Date: 04-13-07
Location: .ro
Posts: 4,030
iTrader: 3 / 100%
ok, so I've finally figured it out...thanks to http://www.microsoft.com/sqlserver/en/us/default.aspx and my brother

now running queries

[me super happy]



 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


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

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 06:11 PM.
Powered by vBulletin
Copyright © 2000-2013 Jelsoft Enterprises Limited.
Copyright © 2003 - 2013 Escalate Media LP




Search Engine Optimization by vBSEO 3.6.0 RC 2 ©2011, Crawlability, Inc.