.dsy:it.
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)


Posted by publi on 24-10-2006 15:08:

[PHP] Da SQL a Excel

E' possibile trasferire le tabelle di un DB in SQL in un file CSV Excel?

__________________
Acchiappasogni


Posted by Hamelin on 25-10-2006 16:49:

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."


Posted by publi on 25-10-2006 17:31:

no, perche vedo che da PhpMyAdmin si puo fare semplicemente, ma da codice non so come fare...


Posted by Walter on 25-10-2006 20:28:

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


Posted by publi on 26-10-2006 14:39:

Uff... sono punto a capo... :(

__________________
Acchiappasogni


Posted by Hamelin on 26-10-2006 15:33:

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."


Posted by publi on 26-10-2006 16:06:

fatta! semplice semplice, ma non conoscevo gli header da inserire...

__________________
Acchiappasogni


All times are GMT. The time now is 17:51.
Show all 7 posts from this thread on one page

Powered by: vBulletin Version 2.3.1
Copyright © Jelsoft Enterprises Limited 2000 - 2002.