Waldo
07-30-2003, 01:39 AM
I'm looking to use a text file to store a small database (>100 entries most likely) for a calendar. It would be web-editable through a PHP script. I have access to a MySQL database but do not wish to take the time to learn SQL and would rather store all information in a text file (I don't want to be roped in to having to host with a MySQL provider).
My current idea would be a database with one record per event, something with these fields:
date(DD.MM.YYYY format, easily splittable by the periods)
event_name
event_summary
event_location
event_author (for keeping track of who adds each new event)
I was looking into a tab-delimited-type file, but as I would most likely use the PHP functions file() and then a regex split by tab, this wouldn't work: the event_summary field could easily have new paragraphs in it, which would involve some sort of replacement character to keep line endings and entry records correct.
Does anyone have any suggestions on a good file format? Or should I just replace new paragraphs with some sort of text string like "\p\" and stick with tab-delimited files? Thanks!
Jeff Walden
My current idea would be a database with one record per event, something with these fields:
date(DD.MM.YYYY format, easily splittable by the periods)
event_name
event_summary
event_location
event_author (for keeping track of who adds each new event)
I was looking into a tab-delimited-type file, but as I would most likely use the PHP functions file() and then a regex split by tab, this wouldn't work: the event_summary field could easily have new paragraphs in it, which would involve some sort of replacement character to keep line endings and entry records correct.
Does anyone have any suggestions on a good file format? Or should I just replace new paragraphs with some sort of text string like "\p\" and stick with tab-delimited files? Thanks!
Jeff Walden