|
-
Jul 2nd, 2008, 06:01 AM
#1
Thread Starter
PowerPoster
[RESOLVED] How should I handle this(csvReader)
Hi Guys,
I have a csv file. I use a CSVReader to get data of the file.
in the first column I have an order number. this is the process:
1. Use the order number and make an Entry into an Category table.
2. Get the last insert if and store in a variable
3. Loop through the csv file and check where the order number equals the current order number and then create items in an item table using the last insert id as a foreign key.
How should I do this. Should I use another csv reader to handle the item creating. please help
-
Jul 4th, 2008, 04:16 AM
#2
New Member
Re: How should I handle this(csvReader)
Is this (http://www.koders.com/java/fid24AE9F...EA2B4F702.aspx) the CSVReader you talk of? If you want to wirte to CSV then you could use CSVWriter (http://www.koders.com/java/fid0734BC...E2E18223.aspx).
To add a row to a CSV you should add it to the end of the CSV string with a column separating each row and with strings in quotes:
1,2,3,4,5,"hello"
-
Jul 7th, 2008, 05:53 AM
#3
Thread Starter
PowerPoster
Re: How should I handle this(csvReader)
Ain't exactly what I need, but some great information I can use for the future. Thanks alot. I have solved my problem
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|