![]() |
Show 150 posts per page |
.dsy:it. (http://www.dsy.it/forum/)
- Tech (http://www.dsy.it/forum/forumdisplay.php?forumid=189)
-- [PHP] Da SQL a Excel (http://www.dsy.it/forum/showthread.php?threadid=27815)
[PHP] Da SQL a Excel
E' possibile trasferire le tabelle di un DB in SQL in un file CSV Excel?
__________________
Acchiappasogni
Non mi pare Excel fornisca un metodo di importazione del genere,ma... CSV è un formato molto semplice, scrivere del codice (in qualsiasi linguaggio) che trasformi una relazione SQL in un file di questo tipo è piuttosto semplice: basta una SELECT * e poi un po' di parsing sulle tuple risultanti... se poi paramatrizzi la funzione con i nomi di database e relazione puoi ripetere l'operazione quante volte vuoi.
__________________
Bjarne Stroustrup: "I have always wished for my computer to be as easy to use as my telephone; my wish has come true because I can no longer figure out how to use my telephone."
Andrew S. Tanenbaum: "Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway."
Edsger Dijkstra: "Computer Science is no more about computers than astronomy is about telescopes."
Robert Firth: "One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs."
Donald Knuth: "A mathematical formula should never be 'owned' by anybody! Mathematics belong to God."
no, perche vedo che da PhpMyAdmin si puo fare semplicemente, ma da codice non so come fare...
Controlla il codice di phpMyAdmin, è open source ^_^
__________________
"Ragione e passione sono timone e vela della nostra anima navigante." - Kahlil Gibran
"Senza musica la vita sarebbe un errore." - Friedrich Nietzsche
Uff... sono punto a capo... 
__________________
Acchiappasogni
Eddai... CSV è un banale testo ASCII con qualche virgola ( http://www.creativyst.com/Doc/Articles/CSV/CSV01.htm ). Secondo me non ci metti molto ad implementare una soluzione...
__________________
Bjarne Stroustrup: "I have always wished for my computer to be as easy to use as my telephone; my wish has come true because I can no longer figure out how to use my telephone."
Andrew S. Tanenbaum: "Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway."
Edsger Dijkstra: "Computer Science is no more about computers than astronomy is about telescopes."
Robert Firth: "One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs."
Donald Knuth: "A mathematical formula should never be 'owned' by anybody! Mathematics belong to God."
fatta! semplice semplice, ma non conoscevo gli header da inserire...
__________________
Acchiappasogni
| All times are GMT. The time now is 22:36. | Show all 7 posts from this thread on one page |
Powered by: vBulletin Version 2.3.1
Copyright © Jelsoft Enterprises Limited 2000 - 2002.