Tuesday 03 August 2004 6:25:08 am
I have an excel spreadsheet with 3000 lines - all products. I created a class using the admin interface to represent this data. I want to write a php script that will open the csv, and loop round, saving each entry to the ezpublish database. I was thinking of importing into the database using phpmyadmin - but after searching the docs and forum, the database structure has given me a real headache.
<?php
$lines = file('./testdata.csv');
foreach ($lines as $line_num => $line) {
$tracks[$line_num] = explode(",", $line);
//something here to create the ez object and save it to the database?
}
?>
|