Newbies krea Posted August 23, 2010 Newbies Posted August 23, 2010 I'm exporting a file maker record into a csv file and then reading the data in my php code. The problem: it exports records' fields data without any delimiter so my array from the csv will just be an appended string. how can I export my file maker records with a proper delimiter? Please help is totally appreciated as I'm running on a deadline. Thank you all!
comment Posted August 23, 2010 Posted August 23, 2010 When you export as CSV, fields ARE delimited by a comma. In addition, there are quote marks around each field. See also: http://www.filemaker.com/11help/html/import_export.16.25.html#1041694
Newbies krea Posted August 23, 2010 Author Newbies Posted August 23, 2010 Thanks, it points me to something but not solving the problem,. reading the csv, I noticed that the fields are coma separated but the data is broken into many different columns which I guess is making fields that have long multiple entries for the same record append the next entry without the space. And this is creating big trouble for me reading these filed data into an array. For example I have a record that has a field call category which has many entries like, apple/pineaple/mangoes dogs,cats,monkeys lions,tigers,ligers Now when I read those into an array it can give me something like [categories] => apple/pineaple/mangoesdogs,cats,monkeyslions,tigers,ligers. You can see that the problem here comes when I try to brake these appended data into a separate array. Is it possible to make sure the multiple entries are also delimited?
Raybaudi Posted August 23, 2010 Posted August 23, 2010 The delimiter for a value list in a field is Char ( 11 ). Try: applepineaplemangoes dogscatsmonkeys lionstigersligers Note that the space beetween the values is actually that char ( not a space )
Newbies krea Posted August 24, 2010 Author Newbies Posted August 24, 2010 Are there any other characters apart from chr(11)?character for 11 seems to work for only some cases. Please advice. Thank you for showing me this. At least it's getting me closer and closer. -)
comment Posted August 24, 2010 Posted August 24, 2010 As mentioned in the link above, carriage returns in a field export as vertical tab characters (#11) and values in repeating fields are separated by the group separator character (#29). Wouldn't it be easier to parse the XML output in PHP?
Recommended Posts
This topic is 5204 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now