Dsy Network www | forum | my | didattica | howto | wiki | el goog | stats | blog | dona | rappresentanti
Homepage
 Register   Calendar   Members  Faq   Search  Logout 
.dsy:it. : Powered by vBulletin version 2.3.1 .dsy:it. > Didattica > Corsi A - F > Basi di dati ~ informatica triennale > [PROGETTO] "Aste on-line"
Pages (22): « First ... « 2 3 4 5 [6] 7 8 9 10 » ... Last »   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
vlaste
Tecnoclassico

User info:
Registered: Jun 2004
Posts: 472 (0.06 al dì)
Location: Estrema periferia
Corso: Informatica
Anno: terzo... bis
Time Online: 3 Days, 5:56:07: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by virtual
Scrivi il codice sql che usi per creare la tabella
io la creo cosi' e funziona bene:


Faccio quasi tutto con phpmyadmin, cmq la creazione delle tabelle l'ho fatta facendo eseguire il seguente codice mysql:

CREATE TABLE `categoria` (
`nome` varchar(20) NOT NULL,
`figlio_di` varchar(20) default NULL,
PRIMARY KEY (`nome`),
FOREIGN KEY (`figlio_di`) REFERENCES categoria(nome) ON DELETE CASCADE ON UPDATE CASCADE
);
Me la crea, ma poi mi da errori. Per esempio se ho:

NOME--------------------FIGLIO_DI
Abbigliamento---------null
Pantaloni----------------Abbigliamento
Collezionismo-----------null

Mi modifica Collezionismo ma non Abbigliamento!!

ON DELETE SET DEFAULT


La cancellazione di una categoria implica la cancellazione di tutte le sottocategorie... non va messo ON DELETE CASCADE?? :?

Last edited by vlaste on 24-02-2006 at 07:50

24-02-2006 07:47
Click Here to See the Profile for vlaste Click Here to See the Blog of vlaste Click here to Send vlaste a Private Message Find more posts by vlaste Add vlaste to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
virtual
Scheggia Impazzita

User info:
Registered: Feb 2004
Posts: 167 (0.02 al dì)
Location: [MI]
Corso: Informatica
Anno: FINITO!
Time Online: 3 Days, 14:30:20 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by vlaste
Faccio quasi tutto con phpmyadmin, cmq la creazione delle tabelle l'ho fatta facendo eseguire il seguente codice mysql:

La cancellazione di una categoria implica la cancellazione di tutte le sottocategorie... non va messo ON DELETE CASCADE?? :?


Ho eseguoto il codice pari pari come lo hai scritto tu e funziona tutto... pero' io uso postgres, forse il problema è proprio mysql.
Il codice è corretto, perlomeno per quanto riguarda la sintassi SQL.
Piu di questo non so che dire, mi spiace :(

__________________
Linux si coltiva... windows si pianta da solo

La prima volta che Adamo vide Eva disse: "Stai lontana cara, questo coso non so quanto cresce!!

24-02-2006 17:50
Click Here to See the Profile for virtual Click here to Send virtual a Private Message Visit virtual's homepage! Find more posts by virtual Add virtual to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
vlaste
Tecnoclassico

User info:
Registered: Jun 2004
Posts: 472 (0.06 al dì)
Location: Estrema periferia
Corso: Informatica
Anno: terzo... bis
Time Online: 3 Days, 5:56:07: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by virtual
Ho eseguoto il codice pari pari come lo hai scritto tu e funziona tutto... pero' io uso postgres, forse il problema è proprio mysql.
Il codice è corretto, perlomeno per quanto riguarda la sintassi SQL.
Piu di questo non so che dire, mi spiace :(


Infatti penso cambieremo... cheppalle però :(
Ti ringrazio, cmq

24-02-2006 19:02
Click Here to See the Profile for vlaste Click Here to See the Blog of vlaste Click here to Send vlaste a Private Message Find more posts by vlaste Add vlaste to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
FreeStyle
.amico.

User info:
Registered: Oct 2004
Posts: 20 (0.00 al dì)
Location: milano
Corso: informatica
Anno: secondo
Time Online: 20:19:13 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Ho un problema..aiuttooooooooooo..ho bisogno che un valore di una variabile che è nel php la devo trasmettere a livello html come posso fare?
oppure la posso trasmettere in un'altro file php?...grazie

25-02-2006 13:28
Click Here to See the Profile for FreeStyle Click here to Send FreeStyle a Private Message Find more posts by FreeStyle Add FreeStyle to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
vlaste
Tecnoclassico

User info:
Registered: Jun 2004
Posts: 472 (0.06 al dì)
Location: Estrema periferia
Corso: Informatica
Anno: terzo... bis
Time Online: 3 Days, 5:56:07: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Ogni volta che usi quella variabile apri e chiudi i tag php:

<?php.... uso variabile....?>

però ti conviene fare tutto in php ed inserire nelle varie echo il codice html... io lo trovo più semplice...

25-02-2006 16:00
Click Here to See the Profile for vlaste Click Here to See the Blog of vlaste Click here to Send vlaste a Private Message Find more posts by vlaste Add vlaste to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
vlaste
Tecnoclassico

User info:
Registered: Jun 2004
Posts: 472 (0.06 al dì)
Location: Estrema periferia
Corso: Informatica
Anno: terzo... bis
Time Online: 3 Days, 5:56:07: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Altro problema
Questa volta di tipo "concettuale"... posso inserire sotto-categoria in una categoria che contiene degli oggetti in vendita?? Secondo me no... gli oggetti presenti andrebbero smistati nella/e nuova/e sottocategoria/e e questo automaticamente non credo proprio che sia realizzabile...
Grazie a chiunque mi esprima il suo parere!:D

26-02-2006 09:16
Click Here to See the Profile for vlaste Click Here to See the Blog of vlaste Click here to Send vlaste a Private Message Find more posts by vlaste Add vlaste to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
andrea
.illuminato.

User info:
Registered: Apr 2003
Posts: 224 (0.03 al dì)
Location: Lissone
Corso: Informatica
Anno: 3
Time Online: 2 Days, 4:53:22 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Ragazzi, sulla questione degli utenti amministratori qualcuno sa dire qualcosa? Come vanno creati, come gli alri utenti? O voi fissate staticamente un utente amministratore? Quest'ultima soluzine mi pare logica, ma nelle specifiche di progetto si dice che in sede d'esame si vuole creare un utente amministratore. Che significa?

Inoltre, l'rale come funziona? Vengono fatte domande solo sul progetto? Grazie mille.

27-02-2006 07:49
Click Here to See the Profile for andrea Click here to Send andrea a Private Message Find more posts by andrea Add andrea to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
stereolab
.primate.

User info:
Registered: Jan 2004
Posts: 74 (0.01 al dì)
Location:
Corso: Informatica
Anno:
Time Online: 1 Day, 7:39:47 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Ciao,

qualcuno ha idea di quale sia la data di consegna in Aprile ?????

28-02-2006 07:19
Click Here to See the Profile for stereolab Click here to Send stereolab a Private Message Find more posts by stereolab Add stereolab to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
vlaste
Tecnoclassico

User info:
Registered: Jun 2004
Posts: 472 (0.06 al dì)
Location: Estrema periferia
Corso: Informatica
Anno: terzo... bis
Time Online: 3 Days, 5:56:07: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by stereolab
Ciao,
qualcuno ha idea di quale sia la data di consegna in Aprile ?????


La data dell'appello, mi pare 11 aprile o giù di lì

28-02-2006 07:27
Click Here to See the Profile for vlaste Click Here to See the Blog of vlaste Click here to Send vlaste a Private Message Find more posts by vlaste Add vlaste to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
vlaste
Tecnoclassico

User info:
Registered: Jun 2004
Posts: 472 (0.06 al dì)
Location: Estrema periferia
Corso: Informatica
Anno: terzo... bis
Time Online: 3 Days, 5:56:07: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by vlaste
PROBLEMONE

Allora, ho realizzato la tabella categoria, con i campi nome e figlio_di...
figlio_di è chiave esterna, e si riferisce a categoria(nome).
Poi ho messo ON DELETE CASCADE e ON UPDATE CASCADE

Se cancello una categoria, mi cancella anche tutte le tuple che referenziano quella categoria... ma se provo a modificare il nome di una categoria referenziata da qualche altra tupla, mi da errore!!!

MA PERCHè!?!?!?!?!? gli ho messo ON UPDATE CASCADE!!!

:wall: Non so più dove sbattere la testa!! :climb:


C'è un bellissimo bug in mySql :shock:: posto qui la notizia che magari è utile a qualcuno, che non scleri come noi:

http://bugs.mysql.com/bug.php?id=3439

28-02-2006 07:28
Click Here to See the Profile for vlaste Click Here to See the Blog of vlaste Click here to Send vlaste a Private Message Find more posts by vlaste Add vlaste to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Gioe
.grande:maestro.

User info:
Registered: Nov 2003
Posts: 521 (0.06 al dì)
Location: Piacenza
Corso: Informatica
Anno: 3
Time Online: 25 Days, 8:18:44 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Come si fa a prelevare da postgres i dati in un ciclo while? sulle slide dice di usare while($row = pg_fetch_array($risultato, PSQL_NUM)
...codice... (che nel mio caso è una echo che crea la tabella degli oggetti)
ma non mi funziona...

__________________
@~@~@~@~@~@~@~@~@~@

TIMEO DANAOS ET DONA FERENTES

@~@~@~@~@~@~@~@~@~@

28-02-2006 20:05
Click Here to See the Profile for Gioe Click here to Send Gioe a Private Message Find more posts by Gioe Add Gioe to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
virtual
Scheggia Impazzita

User info:
Registered: Feb 2004
Posts: 167 (0.02 al dì)
Location: [MI]
Corso: Informatica
Anno: FINITO!
Time Online: 3 Days, 14:30:20 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Gioe
ma non mi funziona...


Io uso il for che non sbaglia mai.... :)

$select="select * from bla bla bla..."; //prepari la query
$handler=pg_query($db,$select); //esegui la query ed hai l'handler

for($i=0;$i<pg_num_rows($handler);$i++) //ciclo su tutte le righe
echo $tupla=pg_fetch_row($handler,$i); //prelevi la riga i-esima


tutto qui

edit: dimenticavo... prima del ciclo devi controllare che ci siano righe nella query altrimenti il pg_fetch_row va in errore

__________________
Linux si coltiva... windows si pianta da solo

La prima volta che Adamo vide Eva disse: "Stai lontana cara, questo coso non so quanto cresce!!

Last edited by virtual on 28-02-2006 at 20:40

28-02-2006 20:37
Click Here to See the Profile for virtual Click here to Send virtual a Private Message Visit virtual's homepage! Find more posts by virtual Add virtual to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Gioe
.grande:maestro.

User info:
Registered: Nov 2003
Posts: 521 (0.06 al dì)
Location: Piacenza
Corso: Informatica
Anno: 3
Time Online: 25 Days, 8:18:44 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

sono riuscito a risolvere... ho usato invece che fetch_array, while($row = pg_fetch_row($ris)) e mi funziona perfettamente :)

__________________
@~@~@~@~@~@~@~@~@~@

TIMEO DANAOS ET DONA FERENTES

@~@~@~@~@~@~@~@~@~@

28-02-2006 20:51
Click Here to See the Profile for Gioe Click here to Send Gioe a Private Message Find more posts by Gioe Add Gioe to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Gioe
.grande:maestro.

User info:
Registered: Nov 2003
Posts: 521 (0.06 al dì)
Location: Piacenza
Corso: Informatica
Anno: 3
Time Online: 25 Days, 8:18:44 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

un altro problema, non riesco a settare il cookie, non produco output prima del setcookie... scrivo semplicemente setcookie('Loggato', $log) e niente....provo a mettere un if(setcookie(...)) echo "cookie inviato" ma niente...quindi significa che il cookie non viene nemmeno inviato....

__________________
@~@~@~@~@~@~@~@~@~@

TIMEO DANAOS ET DONA FERENTES

@~@~@~@~@~@~@~@~@~@

01-03-2006 22:53
Click Here to See the Profile for Gioe Click here to Send Gioe a Private Message Find more posts by Gioe Add Gioe to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
virtual
Scheggia Impazzita

User info:
Registered: Feb 2004
Posts: 167 (0.02 al dì)
Location: [MI]
Corso: Informatica
Anno: FINITO!
Time Online: 3 Days, 14:30:20 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Gioe
un altro problema, non riesco a settare il cookie,


dopo che setti il cookie prova a vedere cosa c'è dentro la variabile globale $_COOKIE['nome_cookie']

__________________
Linux si coltiva... windows si pianta da solo

La prima volta che Adamo vide Eva disse: "Stai lontana cara, questo coso non so quanto cresce!!

02-03-2006 11:24
Click Here to See the Profile for virtual Click here to Send virtual a Private Message Visit virtual's homepage! Find more posts by virtual Add virtual to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 12:07.    Post New Thread    Post A Reply
Pages (22): « First ... « 2 3 4 5 [6] 7 8 9 10 » ... Last »   Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread | Add to Bookmarks

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
 

Powered by: vBulletin v2.3.1 - Copyright ©2000 - 2002, Jelsoft Enterprises Limited
Mantained by dsy crew (email) | Collabora con noi | Segnalaci un bug | Archive | Regolamento | Licenze | Thanks | Syndacate
Pagina generata in 0.199 seconds (55.50% PHP - 44.50% MySQL) con 24 query.