Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Webapp to Search Comma-separated Values Files

Webapp to Search Comma-separated Values Files
Thread Tools
baw
Mac Elite
Join Date: Jun 2005
Status: Offline
Reply With Quote
Aug 17, 2006, 03:11 AM
 
I'd like to create a webpage (probably would be php script and mysql?) that I could upload a .csv file. And then setup a query and then run this query and have the page return the results of the query.

I've used php and mysql over the years but I don't have the knowledge to start this from scratch. If someone could point me in the right direction, that'd be great.
     
baw  (op)
Mac Elite
Join Date: Jun 2005
Status: Offline
Reply With Quote
Aug 17, 2006, 12:44 PM
 
Not finding what I want on the web, so I'm going to go it alone. Firgure I'll start small first and accomplish basic things first.

Code:
Choose file to upload -> Check table for old data -> Delete data in table if found -> Insert new data from CSV file into table
     
Fresh-Faced Recruit
Join Date: Aug 2006
Status: Offline
Reply With Quote
Aug 29, 2006, 10:37 AM
 
Here's my 2-cents on the topic...

Take a look at phpmyadmin....you'll be able to see some samples of php code implementing table creation and dba scripts on a db. Your first task would be to interpret the csv file and use the first line as the "header" row. Create a new db table with the columns identified by the header row. Then, do inserts of the data into your new table. You can then run sql queries against the table. Some may say use arrays and memory, but then you may run into problems intepreting and processing your own queries against data stored in memory. By creating a db table with the data, you'll at least be able to leverage the sql language.

Good luck!
favourite sites: RankAMovie.com, imdb , cnet
     
   
Thread Tools
Forum Links
Forum 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 On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 10:57 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2