..MySql to Csv..

eMmm ini script Mysql ke Cvs, yah niatnya mo di jadiin koleksi *halah barang kalee koleksi *. Dari kemaren keq ketemu ilhamnya *semalem ketemu ilham dikampus*, ilham orang beneran tp dia bukan inspirasi codingnya koq jd ga ada hubungannya.πŸ˜› Tinggal bikin Csv ke Mysqlnya, yang ini masih underconstruction belum nemu ilham2 yang lain *halah *.

Mysql to CSV code :

= '$tggl1' and a.t_ticket t_ticket;
$nik = $row->nik; $jn_prog =
$row->jn_prog; $uraian = $row->uraian;
$estimasi = $row->estimasi;
$t_giat = $row->t_giat;
$kegiatan = $row->kegiatan;
$somecontent .= $t_ticket.",".$nik.",".$jn_prog.",".$uraian.",".$estimasi.",".$t_giat.",".$kegiatan."\n";
}
$fp = fopen($filename, "w");
$oke=fputs($fp , $somecontent);

if ($oke) {
echo "Data ${x}_${y}.csv Successfully create.";
echo ""; echo "[back]";
} else
echo "Data not create";
?>

source : My old blogsome Mysql2csv

One thought on “..MySql to Csv..

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s