List:General Discussion« Previous MessageNext Message »
From:gerald_clark Date:July 17 2003 6:18pm
Subject:Re: Select via Perl
View as plain text  

Ashwin Kutty wrote:

>I am trying to read a file and see if the contents of it exists in the DB
>or not and am trying to do it via a Select.
>
>I try to do a select * into outfile /tmp/result.txt from table where field
>like "%$var%"; but it always goes through the first two lines of the input
>file and then says the file already exists.
>
>Is this because I read each line of a file in a for loop in perl and the
>mysql query tries to recreate the outfile each time? 
>
Yes

> Is there any other
>way I can dump the results of the select to a file of some sort?
>
Have the perl program append the /tmp/result.txt to 
/tmp/ultimateresult.txt , and unlink /tmp/result.txt
inside your loop.

>
>Thanks..
>
>
>  
>


Thread
Select via PerlAshwin Kutty17 Jul
  • Re: Select via Perlgerald_clark17 Jul
RE: Select via PerlRudy Metzger18 Jul
  • RE: Select via PerlAshwin Kutty18 Jul
  • Re: Select via Perl (Curtis Maurand)21 Jul