[thelist] php/mysql - inserting duplicate content

Jack Timmons jorachim at gmail.com
Fri Apr 10 18:23:51 CDT 2009

On Fri, Apr 10, 2009 at 1:03 PM, Bob Meetin <bobm at dottedi.biz> wrote:

> I wrote a script to import content from a .csv file (tab delimited) into
> the Joomla-Virtuemart shipping_rate table.  I have it set to read the
> contents of the .csv file, then line by line if a line meets a test run
> the mysql query.  The problem I have encountered is that it is running
> the query twice and I'm ending up with duplicate rows for every row in
> the .csv file.
> If I add an echo statement I don't see the duplicate entry echoing
> back.  If I echo back the query and copy/paste at the mysql prompt it
> behaves, of course, only a single entry.
> So, is there something about the while loop that is messed up?

If you could pastebin to original code, I'd be happy to take a look at it
for you.

-Jack Timmons
Twitter: @codeacula

More information about the thelist mailing list