Sterling0 Posted July 8, 2011 Share Posted July 8, 2011 My SQL server version is 5.0.91. I run a non-profit that allows people to locate free and reduced-price healthcare services throughout the US and its territories, located here: www.freecarefinder.org It also allows clinics to add their own information to the database, which is arranged like this: Table "Clinics" NameAddressPhoneStateCountyPID Jim's Clinic1234 Main Street, NYC, NY123-456-7890New YorkYork7601 Table "Services" PIDService 7601Audiology 7601Family Practice 7601Mental Health The guest chooses his/her state, county, and specialty and the site searches for matches using NATURAL JOIN between the two tables. The guest is also able to add clinics one-at-a-time. My goal, however, is to introduce a way in which someone (myself included) could add multiple clinics at once, each with multiple services. I have, for example, 5700 clinics to add that each cover mental health, addiction treatment, and some other services. My original thought was to have the user download a template .csv file and have them fill it out, then upload it, and php/sql would insert it into the database, but I can't figure out how to set it up such that it could read something like this: NameAddressPhoneStateCountyFamily PracticeHIV/AIDSDentistry(...etc) Jim's Clinic1234 Main Street, NYC, NY123-456-7890NYYorkX[/td]X And put it into the "Services" table. Any suggestions? Please keep in mind that I'm fairly new at this. Thanks in advance! Link to comment https://forums.phpfreaks.com/topic/241430-distributing-csv-file-into-multiple-rows/ Share on other sites More sharing options...
fenway Posted July 11, 2011 Share Posted July 11, 2011 Why not have a web interface? Link to comment https://forums.phpfreaks.com/topic/241430-distributing-csv-file-into-multiple-rows/#findComment-1241312 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.