I'm getting my money's worth here :)
I am importing mutiple feeds from different sources. Some of the feeds have no headers, some do. I have a table set up and can import the data with headers with no problems. But I have feeds with no headers. how can I import them inot the table with the rest of the data?
so I have something like this now
Price = '".mysql_real_escape_string( $product["Product Price"] )."',
Category = '".mysql_real_escape_string( $product["category"] )."',
ImageURL = '".mysql_real_escape_string( $product["thumbnail image url"] )."',
How should the below look?
Price = '".mysql_real_escape_string( $product["what goes here?"] )."',
Many thanks!
Don
Thanks, that's exactly what I needed to know! You never disappoint :)
Hi Don,
CSV files with no header row are automatically given the field names FIELD1,FIELD2,...,FIELDn. The easiest thing to do would be to upload the feed to the demo page; or use the basic file analysis example to see which field names to use.
Once you know which field number contains the field you want, your code for the headerless feed would look something like this:
Price = '".mysql_real_escape_string( $product["FIELD3"] )."',
Hope this helps!
David.