RE: [Linux-programlama] mysql'deki bir tablo nasil text dosyayadonusturulur?

---------

New Message Reply About this list Date view Thread view Subject view Author view Attachment view

From: Ozcan GUNGOR (ozcangungor@gmail.com)
Date: Mon 15 Aug 2005 - 08:54:39 EEST


man mysql

http://tr2.php.net/manual/en/function.system.php

On Sat, 2005-08-13 at 18:05 +0300, Huseyin A. Ozbey wrote:

> Ozcan Bey
> system("echo \"select concat(id,' ',isim) from user;\" | mysql evrak >
> tablo.txt");
> Bu satirlarda sorgu mysql'de nerede calistiriliyor?
> Sonra evrak nedir?
>
> Huseyin A. Ozbey
>
>
> On Sat, 2005-08-13 at 09:59, Ozcan GUNGOR wrote:
> > Tabloyu bir dosyaya aktarabilmek için şunu kullanabilirsiniz:
> >
> > system("echo \"select concat(id,' ',isim) from user;\" | mysql evrak >
> > tablo.txt");
> >
> > Dosyayı maile iliştirmek için de :
> >
> > $header="Content-Type: multipart/mixed;
> > boundary=\"=_NextPart_000_01C59E2D.6CBB13E6\"";
> > $fd=fopen("a","r");
> > $message="\n--=_NextPart_000_01C59E2D.6CBB13E6\n";
> > $message.="Content-Type: multipart/alternative;
> > boundary=\"=_NextPart_000_01C59E2D.6CBB13E6\"\n";
> > $message="\n--=_NextPart_000_01C59E2D.6CBB13E6\n";
> > $message.="Content-Type: text/plain; charset=\"ISO-8859-9\"\n";
> > $message.="Content-Transfer-Encoding: quoted-printable\n\n";
> > $message.="ozcan ben\n";// görünecek mesaj
> > $message.="\n--=_NextPart_000_01C59E2D.6CBB13E6\n";
> > $message.="Content-Type: text/plain; name=\"Dosya.txt\"\n";
> > $message.="Content-Disposition: attachment; filename=\"Dosya.txt\"\n";
> > $message.="Content-Transfer-Encoding: quoted-printable\n\n";//dosyanın
> > tipi
> > $message.=fread($fd, filesize("a"));//dosya ekleniyor
> > $message.="\n--=_NextPart_000_01C59E2D.6CBB13E6--";
> >
> > mail("ozcan@ozcan.com", "deneme" , $message, $header);
> >
> >
> >
> > > From: linux-programlama-bounces@liste.linux.org.tr
> > > [mailto:linux-programlama-bounces@liste.linux.org.tr] On Behalf Of
> > > Huseyin A. Ozbey
> > > Sent: Friday, August 12, 2005 4:45 PM
> > > To: linux-programlama@liste.linux.org.tr
> > > Subject: [Linux-programlama] mysql'deki bir tablo nasil text
> > > dosyayadonusturulur?
> > >
> > > Merhaba
> > > Nasil yapacagimi bilmedigim iki problemi cozmem gerekiyor.
> > > Birincisi;mysql'de olusturdugum bir tabloyu bir php kodu yardimi ile tab
> > > ile ayrilmis bir text dosyaya donusturmem gerekiyor, baska bir ifade ile
> > > phpmyadmin'de el ile yaptigimiz export islemini php kodu ile yapmam
> > > gerekiyor.
> > >
> > > Ikincisi;Bu text dosyayi mail atacagim ama attachment olarak nasil
> > > atarim. Bildigim sadece
> > > #cat textdosya | mail -s "konu" mailadresi@domain.com
> > > Karsi taraftaki sistemde import edilecek bu dosyalarin bir daha copy
> > > paste yapilmasini gerektirecek bu yol pek uygun degil ama. Ne tavsiye
> > > edersiniz. Dosyalari nasil mail'e eklerim.
> > >
> > > Saygilarimla
> > >
> > > Huseyin A. Ozbey
> > >
> >
> >
> >
> > ______________________________________________________________________
> > _______________________________________________
> > Linux-programlama mailing list
> > Linux-programlama@liste.linux.org.tr
> > http://liste.linux.org.tr/mailman/listinfo/linux-programlama
>
> _______________________________________________
> Linux-programlama mailing list
> Linux-programlama@liste.linux.org.tr
> http://liste.linux.org.tr/mailman/listinfo/linux-programlama

_______________________________________________
Linux-programlama mailing list
Linux-programlama@liste.linux.org.tr
http://liste.linux.org.tr/mailman/listinfo/linux-programlama


New Message Reply About this list Date view Thread view Subject view Author view Attachment view

---------

Bu arsiv hypermail 2.1.2 tarafindan uretilmistir.