Re: MySQL

From: Date: Fri, 28 Jul 2000 01:32:38 +0000
Subject: Re: MySQL
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-1355@lists.php.net to get a copy of this message
Indeed there is, Jaco. I actually did something in the reverse order with a client who wanted to be able to download the MySQL database as a CSV file. All you have to do is open the file and get each line as a string. Then use the explode function to change the the string into an array like so: $pizza = "piece1,piece2,piece3,piece4,piece5,piece6"; $myArray = explode (",", $pizza); Your $myArray variable will have each of those pieces as a discreet element now. It's not much work to walk through and add those values to your MySQL DB now. Do this for every line in your CSV file and you're there. Brian Capture Labs Seattle ""Jaco van der Merwe"" <jaco@webapps.co.za> wrote in message news:001801bff1b2$58d3a000$0100a8c0@toshiba... Hi, I am running Win98, Apache Webserver, MySQL and PHP3. I would just like to know if there is any way to import a CSV file into MySQL. Thanx Jaco van der Merwe Email: jaco@webapps.co.za Phone: +27 83-725-0281 ICQ: 73549286

« previous php.windows (#1355) next »