Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> PHP
Author Message
count
New Member
New Member



Joined: Jun 23, 2005
Posts: 16

PostPosted: Tue Jul 19, 2005 8:07 pm Reply with quote

Simple question.

When importing a csv into a table as an arry. Is there anyway to skip over a line and not have it import?

Also the csv that I'm using has a ' in it. It is causing a error in the import to sql. How do I get around this? I'm still very new to php and I think its going to invole a str replace (well I was looking at the stripslashes in nuke to see how this worked). I think I could hack thru the code and make it work, but I want to make it work the right way.
 
View user's profile Send private message
sting
Involved
Involved



Joined: Sep 23, 2003
Posts: 456
Location: Somewhere out there...

PostPosted: Tue Jul 19, 2005 9:22 pm Reply with quote

A line in particular or every other line?

Can you remove the ' safely prior to importing in a mass search/replace?

-sting
 
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
count







PostPosted: Tue Jul 19, 2005 10:14 pm Reply with quote

The file that I'm importing the first two lines I want to drop them. They are header lines and are unneeded for the sql table.

I can remove the ' and everything works great. Would like to have to script take care of this. Right now I can tell the users to open the file, delete the first two lines and search for ' and delete all of them, but would rather have it all automated.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> PHP

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©