Loading ...
Sorry, an error occurred while loading the content.

Re: [id-php] Re: Upload data ke .csv atau excell

Expand Messages
  • Sayuti Chow
    intinya sih tinggal kita buat content disposisition aja. kalo biasa content type = text/html di bagian echo sesuatu itu tinggal di buat aja query nya. moga2
    Message 1 of 22 , Aug 3 1:54 AM
    • 0 Attachment
      intinya sih tinggal kita buat content disposisition aja. kalo biasa content
      type = text/html

      di bagian echo sesuatu itu tinggal di buat aja query nya.
      moga2 membantu.

      <?
      $filename ='Fileku_' . date("Ymd") . ".csv";
      header("Content-type: text/plain");
      header("Content-Disposition: attachment; filename=$filename;");
      header("Content-Description: Exported text file, Please select save");
      echo "sesuatu";
      ?>



      On 8/3/06, mel_ucy <mel_ucy@...> wrote:
      >
      > Data dari mysql (database kita) akan diexport ke textfile (.csv)
      > maaf ya... pertanyaannya ngebingungin ya.. :D
      >
      >
      > --- In id-php@yahoogroups.com <id-php%40yahoogroups.com>, "Sayuti Chow"
      > <sayuti@...> wrote:
      > >
      > > maksudnya apa ya ?
      > > apakah upload dari CSV/Excel ke Mysql
      > > atau dari Mysql didownload jadi CSV/Excel ?
      > >
      > > On 8/3/06, mel_ucy <mel_ucy@...> wrote:
      > > >
      > > > Dear all,
      > > >
      > > > Teman2, ada yang punya contoh program upload data dari mysql ke
      > text
      > > > (.csv) atau ke excell ngga ?
      > > > Kalo ada, saya boleh minta donk.
      > > >
      > > > Makasih banyak sebelumnya. ^_^
      > > > Lucy
      > > >
      > > >
      > > >
      > >
      > >
      > >
      > > --
      > > New mail concept. Thanks Gmail
      > >
      > > Sayuti Chow
      > >
      > >
      > > [Non-text portions of this message have been removed]
      > >
      >
      >
      >



      --
      New mail concept. Thanks Gmail

      Sayuti Chow


      [Non-text portions of this message have been removed]
    • tantos
      LOAD INTO OUTFILE blablabla ... -- http://tantos.web.id http://www.rekmed-ugm.org http://bantulcraft.com http://taman-jati.com Y! xundertanktop [Non-text
      Message 2 of 22 , Aug 3 3:07 AM
      • 0 Attachment
        LOAD INTO OUTFILE blablabla

        On 8/3/06, Sayuti Chow <sayuti@...> wrote:
        >
        > intinya sih tinggal kita buat content disposisition aja. kalo biasa
        > content
        > type = text/html
        >
        > di bagian echo sesuatu itu tinggal di buat aja query nya.
        > moga2 membantu.
        >
        > <?
        > $filename ='Fileku_' . date("Ymd") . ".csv";
        > header("Content-type: text/plain");
        > header("Content-Disposition: attachment; filename=$filename;");
        > header("Content-Description: Exported text file, Please select save");
        > echo "sesuatu";
        > ?>
        >
        >
        >
        > On 8/3/06, mel_ucy <mel_ucy@...> wrote:
        > >
        > > Data dari mysql (database kita) akan diexport ke textfile (.csv)
        > > maaf ya... pertanyaannya ngebingungin ya.. :D
        > >
        > >
        > > --- In id-php@yahoogroups.com <id-php%40yahoogroups.com>, "Sayuti Chow"
        > > <sayuti@...> wrote:
        > > >
        > > > maksudnya apa ya ?
        > > > apakah upload dari CSV/Excel ke Mysql
        > > > atau dari Mysql didownload jadi CSV/Excel ?
        > > >
        > > > On 8/3/06, mel_ucy <mel_ucy@...> wrote:
        > > > >
        > > > > Dear all,
        > > > >
        > > > > Teman2, ada yang punya contoh program upload data dari mysql ke
        > > text
        > > > > (.csv) atau ke excell ngga ?
        > > > > Kalo ada, saya boleh minta donk.
        > > > >
        > > > > Makasih banyak sebelumnya. ^_^
        > > > > Lucy
        > > > >
        > > > >
        > > > >
        > > >
        > > >
        > > >
        > > > --
        > > > New mail concept. Thanks Gmail
        > > >
        > > > Sayuti Chow
        > > >
        > > >
        > > > [Non-text portions of this message have been removed]
        > > >
        > >
        > >
        > >
        >
        >
        >
        > --
        > New mail concept. Thanks Gmail
        >
        > Sayuti Chow
        >
        >
        > [Non-text portions of this message have been removed]
        >
        >
        >
        > KUNJUNGI
        > KUNJUNGI
        > KUNJUNGI Forum Kita http://indoforums.com/id-php
        > KUNJUNGI
        > KUNJUNGI
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
        >
        >
        >


        --
        http://tantos.web.id
        http://www.rekmed-ugm.org
        http://bantulcraft.com
        http://taman-jati.com
        Y! xundertanktop


        [Non-text portions of this message have been removed]
      • tantos
        huooh, pake xml ae ... -- http://tantos.web.id http://www.rekmed-ugm.org http://bantulcraft.com http://taman-jati.com Y! xundertanktop [Non-text portions of
        Message 3 of 22 , Aug 3 3:08 AM
        • 0 Attachment
          huooh, pake xml ae

          On 8/3/06, radyan aprianto <hello.redi@...> wrote:
          >
          > Steven Haryanto wrote:
          > > arifin wrote:
          > >
          > >> bagaimana ya caranya mencegah sql injection?
          > >>
          > >
          > > jangan pake database sql? pake flat file aja misalnya. :)
          > kalo itu belum memecahkan masalah dong bang stev......???
          >
          > --
          > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          >
          >
          > http://radyan.progress.web.id
          >
          >
          > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          >
          >
          >
          > KUNJUNGI
          > KUNJUNGI
          > KUNJUNGI Forum Kita http://indoforums.com/id-php
          > KUNJUNGI
          > KUNJUNGI
          >
          > Yahoo! Groups Links
          >
          >
          >
          >
          >
          >
          >
          >


          --
          http://tantos.web.id
          http://www.rekmed-ugm.org
          http://bantulcraft.com
          http://taman-jati.com
          Y! xundertanktop


          [Non-text portions of this message have been removed]
        • mycson
          Pakai phpadmin2.8.2 langsung kok gak perlu script khusus dan bisa pilih bhs indonesia lagi. tinggal pilih database-eksport-pilih ke ms excel atau csv atau pdf
          Message 4 of 22 , Aug 3 3:49 AM
          • 0 Attachment
            Pakai phpadmin2.8.2 langsung kok gak perlu script khusus dan bisa pilih
            bhs indonesia lagi.
            tinggal pilih database-eksport-pilih ke ms excel atau csv atau pdf dll

            moga membantu...


            IMPORTANT NOTICE:
            This email may be confidential, may be legally privileged, and is for the intended recipient only. Access, disclosure, copying, distribution, or reliance on any of it by anyone else is prohibited and may be a criminal offence. Please delete if obtained in error and email confirmation to the sender.
          • Aryo Sanjaya
            bagaimana ya caranya mencegah xml injection? ... -- Aryo Sanjaya http://www.mahesajenar.com/ Y!: aryo_sanjaya [Non-text portions of this message have been
            Message 5 of 22 , Aug 3 4:17 AM
            • 0 Attachment
              bagaimana ya caranya mencegah xml injection?

              On 8/3/06, tantos <xundertanktop@...> wrote:
              >
              > huooh, pake xml ae
              >
              >
              > On 8/3/06, radyan aprianto <hello.redi@... <hello.redi%40gmail.com>>
              > wrote:
              > >
              > > Steven Haryanto wrote:
              > > > arifin wrote:
              > > >
              > > >> bagaimana ya caranya mencegah sql injection?
              > > >>
              > > >
              > > > jangan pake database sql? pake flat file aja misalnya. :)
              > > kalo itu belum memecahkan masalah dong bang stev......???
              > >
              > > --
              > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              > >
              >
              >


              --
              Aryo Sanjaya

              http://www.mahesajenar.com/
              Y!: aryo_sanjaya


              [Non-text portions of this message have been removed]
            • Isdah Ahmad
              yeah rite™... pake xml eh eh... kapan hari itu ada yang ngusulin mending pake json... udah liat seeh... tapi masih lom mudheng... hehehe... ... [Non-text
              Message 6 of 22 , Aug 3 5:05 AM
              • 0 Attachment
                yeah rite�... pake xml

                eh eh... kapan hari itu ada yang ngusulin mending pake json... udah liat
                seeh... tapi masih lom mudheng... hehehe...

                On 8/3/06, tantos <xundertanktop@...> wrote:
                >
                > huooh, pake xml ae
                >
                > On 8/3/06, radyan aprianto <hello.redi@...> wrote:
                > >
                > > Steven Haryanto wrote:
                > > > arifin wrote:
                > > >
                > > >> bagaimana ya caranya mencegah sql injection?
                > > >>
                > > >
                > > > jangan pake database sql? pake flat file aja misalnya. :)
                > > kalo itu belum memecahkan masalah dong bang stev......???
                > >
                > > --
                > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                > >
                > >
                > > http://radyan.progress.web.id
                > >
                > >
                > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                > >
                > >
                > >
                > > KUNJUNGI
                > > KUNJUNGI
                > > KUNJUNGI Forum Kita http://indoforums.com/id-php
                > > KUNJUNGI
                > > KUNJUNGI
                > >
                > > Yahoo! Groups Links
                > >
                > >
                > >
                > >
                > >
                > >
                > >
                > >
                >
                >
                > --
                > http://tantos.web.id
                > http://www.rekmed-ugm.org
                > http://bantulcraft.com
                > http://taman-jati.com
                > Y! xundertanktop
                >
                >
                >


                [Non-text portions of this message have been removed]
              • radyan aprianto
                ... walah, cuma mau nambah masalah baru..... :) pusing ah.. ga mau ikutan mikir.... hehehehe..... - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                Message 7 of 22 , Aug 3 5:17 AM
                • 0 Attachment
                  Aryo Sanjaya wrote:
                  > bagaimana ya caranya mencegah xml injection?
                  walah, cuma mau nambah masalah baru..... :)
                  pusing ah.. ga mau ikutan mikir.... hehehehe.....

                  -
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


                  http://radyan.progress.web.id


                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                • mel_ucy
                  Justru saya mau buat codingnya pake PHP. :D Anyway thanks ya... kayanya udah dapet sedikit pencerahan juga dari google nich. :) ... pilih ... dll ... for the
                  Message 8 of 22 , Aug 3 7:47 PM
                  • 0 Attachment
                    Justru saya mau buat codingnya pake PHP. :D
                    Anyway thanks ya... kayanya udah dapet sedikit pencerahan juga dari
                    google nich. :)


                    --- In id-php@yahoogroups.com, mycson <mycson@...> wrote:
                    >
                    > Pakai phpadmin2.8.2 langsung kok gak perlu script khusus dan bisa
                    pilih
                    > bhs indonesia lagi.
                    > tinggal pilih database-eksport-pilih ke ms excel atau csv atau pdf
                    dll
                    >
                    > moga membantu...
                    >
                    >
                    > IMPORTANT NOTICE:
                    > This email may be confidential, may be legally privileged, and is
                    for the intended recipient only. Access, disclosure, copying,
                    distribution, or reliance on any of it by anyone else is prohibited
                    and may be a criminal offence. Please delete if obtained in error
                    and email confirmation to the sender.
                    >
                  • mel_ucy
                    Justru saya mau buat codingnya pake PHP. :D Anyway thanks ya... kayanya udah dapet sedikit pencerahan juga dari google nich. :) ... pilih ... dll ... for the
                    Message 9 of 22 , Aug 3 8:00 PM
                    • 0 Attachment
                      Justru saya mau buat codingnya pake PHP. :D
                      Anyway thanks ya... kayanya udah dapet sedikit pencerahan juga dari
                      google nich. :)


                      --- In id-php@yahoogroups.com, mycson <mycson@...> wrote:
                      >
                      > Pakai phpadmin2.8.2 langsung kok gak perlu script khusus dan bisa
                      pilih
                      > bhs indonesia lagi.
                      > tinggal pilih database-eksport-pilih ke ms excel atau csv atau pdf
                      dll
                      >
                      > moga membantu...
                      >
                      >
                      > IMPORTANT NOTICE:
                      > This email may be confidential, may be legally privileged, and is
                      for the intended recipient only. Access, disclosure, copying,
                      distribution, or reliance on any of it by anyone else is prohibited
                      and may be a criminal offence. Please delete if obtained in error
                      and email confirmation to the sender.
                      >
                    • mycson
                      coba pakai script ini... ? $con = mysql_connect( localhost , usename , password ) or die ( Not Fouund . mysql_error()); mysql_select_db( mydb ) or die
                      Message 10 of 22 , Aug 3 9:59 PM
                      • 0 Attachment
                        coba pakai script ini...

                        ?
                        $con = mysql_connect("localhost" , "usename" , "password") or die ("Not
                        Fouund" . mysql_error());
                        mysql_select_db("mydb") or die ("Not Fouund" . mysql_error());
                        $select = "SELECT * FROM Table_name";
                        $export = mysql_query($select);
                        $fields = mysql_num_fields($export);
                        $header = "" ;
                        $data = "";
                        for ($i = 0; $i < $fields; $i++) {
                        $header .= mysql_field_name($export, $i) . "t";
                        }
                        while($row = mysql_fetch_row($export)) {
                        $line = '';
                        foreach($row as $value) {
                        if ((!isset($value)) OR ($value == "")) {
                        $value = "t";
                        } else {
                        $value = str_replace('"', '""', $value);
                        $value = '"' . $value . '"' . "t";
                        }
                        $line .= $value;
                        }
                        $data .= trim($line)."n";
                        }
                        $data = str_replace("r","",$data);

                        if ($data == "") {
                        $data = "n(0) Records Found!n";
                        }

                        header("Content-type: application/octet-stream");
                        header("Content-Disposition: attachment; filename=AjayExcel.xls");
                        header("Pragma: no-cache");
                        header("Expires: 0");
                        header("Lacation: excel.htm?id=yes");
                        print "$headern$data";
                        ?>

                        aku juga dapat dari teman tapi blm coba...


                        IMPORTANT NOTICE:
                        This email may be confidential, may be legally privileged, and is for the intended recipient only. Access, disclosure, copying, distribution, or reliance on any of it by anyone else is prohibited and may be a criminal offence. Please delete if obtained in error and email confirmation to the sender.
                      • mel_ucy
                        Ok, I ll try. :) Thanks ya... makasih juga buat Sayuti Chow dan Tantos atas bantuannya. Best Regards Lucy ... ( Not ... { ... for the intended recipient only.
                        Message 11 of 22 , Aug 3 11:48 PM
                        • 0 Attachment
                          Ok, I'll try. :)
                          Thanks ya... makasih juga buat Sayuti Chow dan Tantos atas
                          bantuannya.



                          Best Regards
                          Lucy


                          --- In id-php@yahoogroups.com, mycson <mycson@...> wrote:
                          >
                          > coba pakai script ini...
                          >
                          > ?
                          > $con = mysql_connect("localhost" , "usename" , "password") or die
                          ("Not
                          > Fouund" . mysql_error());
                          > mysql_select_db("mydb") or die ("Not Fouund" . mysql_error());
                          > $select = "SELECT * FROM Table_name";
                          > $export = mysql_query($select);
                          > $fields = mysql_num_fields($export);
                          > $header = "" ;
                          > $data = "";
                          > for ($i = 0; $i < $fields; $i++) {
                          > $header .= mysql_field_name($export, $i) . "t";
                          > }
                          > while($row = mysql_fetch_row($export)) {
                          > $line = '';
                          > foreach($row as $value)
                          {
                          > if ((!isset($value)) OR ($value == "")) {
                          > $value = "t";
                          > } else {
                          > $value = str_replace('"', '""', $value);
                          > $value = '"' . $value . '"' . "t";
                          > }
                          > $line .= $value;
                          > }
                          > $data .= trim($line)."n";
                          > }
                          > $data = str_replace("r","",$data);
                          >
                          > if ($data == "") {
                          > $data = "n(0) Records Found!n";
                          > }
                          >
                          > header("Content-type: application/octet-stream");
                          > header("Content-Disposition: attachment; filename=AjayExcel.xls");
                          > header("Pragma: no-cache");
                          > header("Expires: 0");
                          > header("Lacation: excel.htm?id=yes");
                          > print "$headern$data";
                          > ?>
                          >
                          > aku juga dapat dari teman tapi blm coba...
                          >
                          >
                          > IMPORTANT NOTICE:
                          > This email may be confidential, may be legally privileged, and is
                          for the intended recipient only. Access, disclosure, copying,
                          distribution, or reliance on any of it by anyone else is prohibited
                          and may be a criminal offence. Please delete if obtained in error
                          and email confirmation to the sender.
                          >
                        • Steven Haryanto
                          ... lho, kan bisa juga he3. yang ditanya kan bagaimana mencegah . dengan menghindari sesuatu berarti udah mencegah kan? mis gimana cara mencegah masuk angin,
                          Message 12 of 22 , Aug 4 6:22 PM
                          • 0 Attachment
                            radyan aprianto wrote:
                            > Steven Haryanto wrote:
                            >> arifin wrote:
                            >>
                            >>> bagaimana ya caranya mencegah sql injection?
                            >>>
                            >> jangan pake database sql? pake flat file aja misalnya. :)
                            > kalo itu belum memecahkan masalah dong bang stev......???

                            lho, kan bisa juga he3. yang ditanya kan bagaimana 'mencegah'. dengan
                            menghindari sesuatu berarti udah mencegah kan? mis gimana cara mencegah
                            masuk angin, salah satunya ya jangan keluar rumah, apalagi malem2 hehehe...

                            --

                            * h t t p : / / i n d o f o r u m s . c o m / i d - p h p *

                            Steven Haryanto | PT. Master Web Network (MWN)
                            http://people.masterwebnet.com/steven | Ged Cyber Lt9, Kuningan Barat 8
                            Y!:stevenharyanto | Jaksel 12710. Ph: (021) 5269311
                          • tantos
                            =)), bung steven ra niat njawab... ... -- http://tantos.web.id http://www.rekmed-ugm.org http://bantulcraft.com http://taman-jati.com Y! xundertanktop
                            Message 13 of 22 , Aug 5 12:12 AM
                            • 0 Attachment
                              =)), bung steven ra niat njawab...

                              On 8/5/06, Steven Haryanto <steven@...> wrote:
                              >
                              > radyan aprianto wrote:
                              > > Steven Haryanto wrote:
                              > >> arifin wrote:
                              > >>
                              > >>> bagaimana ya caranya mencegah sql injection?
                              > >>>
                              > >> jangan pake database sql? pake flat file aja misalnya. :)
                              > > kalo itu belum memecahkan masalah dong bang stev......???
                              >
                              > lho, kan bisa juga he3. yang ditanya kan bagaimana 'mencegah'. dengan
                              > menghindari sesuatu berarti udah mencegah kan? mis gimana cara mencegah
                              > masuk angin, salah satunya ya jangan keluar rumah, apalagi malem2
                              > hehehe...
                              >
                              > --
                              >
                              > * h t t p : / / i n d o f o r u m s . c o m / i d - p h p *
                              >
                              > Steven Haryanto | PT. Master Web Network (MWN)
                              > http://people.masterwebnet.com/steven | Ged Cyber Lt9, Kuningan Barat 8
                              > Y!:stevenharyanto | Jaksel 12710. Ph: (021) 5269311
                              >
                              >
                              > KUNJUNGI
                              > KUNJUNGI
                              > KUNJUNGI Forum Kita http://indoforums.com/id-php
                              > KUNJUNGI
                              > KUNJUNGI
                              >
                              > Yahoo! Groups Links
                              >
                              >
                              >
                              >
                              >
                              >
                              >


                              --
                              http://tantos.web.id
                              http://www.rekmed-ugm.org
                              http://bantulcraft.com
                              http://taman-jati.com
                              Y! xundertanktop


                              [Non-text portions of this message have been removed]
                            • Aryo Sanjaya
                              pasti gak sengaja kepencet tombol Send ... ... -- Aryo Sanjaya http://www.mahesajenar.com/ Y!: aryo_sanjaya [Non-text portions of this message have been
                              Message 14 of 22 , Aug 5 3:39 PM
                              • 0 Attachment
                                pasti gak sengaja kepencet tombol 'Send'...


                                On 8/5/06, tantos <xundertanktop@...> wrote:
                                >
                                > =)), bung steven ra niat njawab...
                                >
                                >
                                > On 8/5/06, Steven Haryanto <steven@...<steven%40masterwebnet.com>>
                                > wrote:
                                > >
                                > > radyan aprianto wrote:
                                > > > Steven Haryanto wrote:
                                > > >> arifin wrote:
                                > > >>
                                > > >>> bagaimana ya caranya mencegah sql injection?
                                > > >>>
                                > > >> jangan pake database sql? pake flat file aja misalnya. :)
                                > > > kalo itu belum memecahkan masalah dong bang stev......???
                                > >
                                > > lho, kan bisa juga he3. yang ditanya kan bagaimana 'mencegah'. dengan
                                > > menghindari sesuatu berarti udah mencegah kan? mis gimana cara mencegah
                                > > masuk angin, salah satunya ya jangan keluar rumah, apalagi malem2
                                > > hehehe...
                                > >
                                > > --
                                > >
                                >
                                >
                                >



                                --
                                Aryo Sanjaya

                                http://www.mahesajenar.com/
                                Y!: aryo_sanjaya


                                [Non-text portions of this message have been removed]
                              • ferdhie
                                at least itu salah satu solusi paling gampang u/ mencegah SQL injection: ... -- Best Regards, Herdian Ferdianto.
                                Message 15 of 22 , Aug 6 7:24 PM
                                • 0 Attachment
                                  at least itu salah satu solusi paling gampang u/ mencegah SQL injection:

                                  On 8/6/06, Aryo Sanjaya <aryo@...> wrote:
                                  >
                                  >
                                  >
                                  >
                                  >
                                  >
                                  >
                                  > pasti gak sengaja kepencet tombol 'Send'...
                                  >
                                  >
                                  > On 8/5/06, tantos <xundertanktop@...> wrote:
                                  > >
                                  > > =)), bung steven ra niat njawab...
                                  > >
                                  > >
                                  >
                                  > > On 8/5/06, Steven Haryanto <steven@...<steven%40masterwebnet.com>>
                                  >
                                  > > wrote:
                                  > > >
                                  > > > radyan aprianto wrote:
                                  > > > > Steven Haryanto wrote:
                                  > > > >> arifin wrote:
                                  > > > >>
                                  > > > >>> bagaimana ya caranya mencegah sql injection?
                                  > > > >>>
                                  > > > >> jangan pake database sql? pake flat file aja misalnya. :)
                                  > > > > kalo itu belum memecahkan masalah dong bang stev......???
                                  > > >
                                  > > > lho, kan bisa juga he3. yang ditanya kan bagaimana 'mencegah'. dengan
                                  > > > menghindari sesuatu berarti udah mencegah kan? mis gimana cara mencegah
                                  > > > masuk angin, salah satunya ya jangan keluar rumah, apalagi malem2
                                  > > > hehehe...
                                  > > >
                                  > > > --
                                  > > >
                                  > >
                                  > >
                                  > >
                                  >
                                  >
                                  > --
                                  > Aryo Sanjaya
                                  >
                                  > http://www.mahesajenar.com/
                                  > Y!: aryo_sanjaya
                                  >
                                  >
                                  > [Non-text portions of this message have been removed]
                                  >
                                  >
                                  >
                                  >
                                  >



                                  --
                                  Best Regards,
                                  Herdian Ferdianto.
                                Your message has been successfully submitted and would be delivered to recipients shortly.