On Thursday 19 December 2002 19:31, Thomas Goeminne wrote: > I got a tab delimited file which looks like this: > > let us call it items.txt > > Type Catalog Number Item Description Side B Producer > 12 AAA502 Afu Ra-D&D Soundclash Mic Stance, Premeir,Curt Cazall > 12 AC725 Roc Raida/Wayne-O - Gong Show Burn That Ass Roc > Raida > > I want to take all this info and insert it into my mysql dbase. The type is > in a table named categories. The rest should go into the table named items. > With also the id number off the categorie in it. > > I have been looking for info on how to do this but I can't find a decent > article about it. First off I dump all the records which were already in > the dbase. And then it needs to get filled up with the new items.txt
To get you started: 1) use file() to read in the text file 2) use explode(), with "\t" as the delimiter to split each line into their component parts -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* On-line, adj.: The idea that a human being should always be accessible to a computer. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php