Posted by Tim Streater on 03/02/07 10:53
In article <1172832169.649337.178690@h3g2000cwc.googlegroups.com>,
"kenoli" <kenoli.p@gmail.com> wrote:
> I have tried two php scripts in an attempt to load data exported from
> an Exel file into a mysql database. One I found in the archive for
> this group and another elsehwere. Here are the scripts:
[snip]
> This one enters data, but incorrectly, as if there were the wrong
> number of fields in each record (i.e. data ends up in wrong fields),
> though I have checked carefully to make sure this is not the case.
>
> I'm not sure about the line terminations in the csv file. I tried
> using what is created by the Excel export. I also tried opening it
> and saving it in TextWrangler as I know it inserts proper linux line
> terminators. Same problem.
Why not do:
echo $sql . "\n";
to see what you are actually asking mysql to do.
-- tim
[Back to original message]
|