Re: mysql data store in to a FILE

2008-07-04 Thread Dr.Ruud
luke devon schreef: > I just tried to store some mysql-queried data in to a file. but it > wont work. Actually i wanted to do not just writing , it should be > APPEND at each time when that perl scripts runs. > > Can some body help me , if you all can provide me a sample or a > example would be

Re: mysql data store in to a FILE

2008-07-03 Thread David Romero
Sorry, some correction for my own example old my $data = $dbh->selectall_arrayref("SELECT field1, field2 FROM table"); new my $data = $dbh->selectall_arrayref("SELECT field1, field2 FROM table",{Slice=>{}}); On Thu, Jul 3, 2008 at 9:52 AM, David Romero <[EMAIL PROTECTED]> wrote: > #!/usr/bin/pe

Re: mysql data store in to a FILE

2008-07-03 Thread David Romero
#!/usr/bin/perl use strict; use DBI; ##Conect to database my $dbh = DBI->connect('string','user','password') or die "Can't connect to database"; #query my $data = $dbh->selectall_arrayref("SELECT field1, field2 FROM table"); #open file for append >>, # > for write # >> for append # Doc about