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] "Blog" Thread Rating: 1 votes, 4.00 average.
Pages (33): « First ... « 10 11 12 13 [14] 15 16 17 18 » ... Last »   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
zonker
.illuminato.

User info:
Registered: Mar 2003
Posts: 200 (0.02 al dì)
Location:
Corso:
Anno:
Time Online: 2 Days, 6:24:53 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

TIPI(IDTIPO, NOMETIPO, NELEMENTI, MEDIAACCESSI)
Ovviamente nelementi viene aggiornato da un trigger su insert e delete su contenuto e media accessi dalla stessa funzione che incremente il numero di accessi al contenuto

21-03-2007 11:26
Click Here to See the Profile for zonker Click here to Send zonker a Private Message Find more posts by zonker Add zonker to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
khelidan
.grande:maestro.

User info:
Registered: Jun 2003
Posts: 1196 (0.14 al dì)
Location: Milano
Corso: Informatica
Anno: Finito....
Time Online: 13 Days, 12:08:03: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

ho un problema con i trigger,ho fatto questa funzione che dovrebbe essere chiamata da un trigger quando c'è un update sui contenuti:

code:
CREATE FUNCTION up () RETURNS TRIGGER AS ' BEGIN IF NEW.accessi=OLD.accessi THEN NEW.modifiche=NEW.modifiche+1;END IF ;RETURN NEW;END;'


La creo con phppgadmin quindi mancano dei prezzi ma mirotorna sempre:

ERROR: SQL functions cannot return type "trigger"


Come mai??

__________________
Khelidan

21-03-2007 11:36
Click Here to See the Profile for khelidan Click here to Send khelidan a Private Message Find more posts by khelidan Add khelidan to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
bledar
.arcimaestro.

User info:
Registered: Oct 2003
Posts: 256 (0.03 al dì)
Location:
Corso:
Anno:
Time Online: 6 Days, 3:07:56 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

concordo con te zonker , ma e una entita a parte cioe non e in relazione con nessun altra?

21-03-2007 11:48
Click Here to See the Profile for bledar Click here to Send bledar a Private Message Find more posts by bledar Add bledar to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
zonker
.illuminato.

User info:
Registered: Mar 2003
Posts: 200 (0.02 al dì)
Location:
Corso:
Anno:
Time Online: 2 Days, 6:24:53 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Non è che la stai creando sotto funzioni anzichè sotto funzioni trigger?

21-03-2007 11:49
Click Here to See the Profile for zonker Click here to Send zonker a Private Message Find more posts by zonker Add zonker to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
bledar
.arcimaestro.

User info:
Registered: Oct 2003
Posts: 256 (0.03 al dì)
Location:
Corso:
Anno:
Time Online: 6 Days, 3:07:56 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Sono dacordo anche io ho pensato fi fare cosi , ma questa entita e in relazione con qualche altra entita???

TIPI(IDTIPO, NOMETIPO, NELEMENTI, MEDIAACCESSI)
Ovviamente nelementi viene aggiornato da un trigger su insert e delete su contenuto e media accessi dalla stessa funzione che incremente il numero di accessi al contenuto

21-03-2007 11:55
Click Here to See the Profile for bledar Click here to Send bledar a Private Message Find more posts by bledar Add bledar to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
khelidan
.grande:maestro.

User info:
Registered: Jun 2003
Posts: 1196 (0.14 al dì)
Location: Milano
Corso: Informatica
Anno: Finito....
Time Online: 13 Days, 12:08:03: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by zonker
Non è che la stai creando sotto funzioni anzichè sotto funzioni trigger?


Era risposto a me?Comunque mi da lo stesso errore anche in console:

blog=#
CREATE FUNCTION up () RETURNS TRIGGER AS ' BEGIN IF NEW.accessi=OLD.accessi THEN NEW.modifiche=NEW.modifiche+1;END IF ;RETURN NEW;END;' LANGUAGE sql;
ERROR: SQL functions cannot return type "trigger"


Sto impazzendo.....cosa sbaglio?

__________________
Khelidan

21-03-2007 11:59
Click Here to See the Profile for khelidan Click here to Send khelidan a Private Message Find more posts by khelidan Add khelidan to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
zonker
.illuminato.

User info:
Registered: Mar 2003
Posts: 200 (0.02 al dì)
Location:
Corso:
Anno:
Time Online: 2 Days, 6:24:53 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

cambia
LANGUAGE sql;
in
LANGUAGE plpgsql;
e vedrai che come per magia...:-P

21-03-2007 13:42
Click Here to See the Profile for zonker Click here to Send zonker a Private Message Find more posts by zonker Add zonker to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
zonker
.illuminato.

User info:
Registered: Mar 2003
Posts: 200 (0.02 al dì)
Location:
Corso:
Anno:
Time Online: 2 Days, 6:24:53 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

per quel che riguarda l'entità tipi è ovviamente in relazione con contenuti.

21-03-2007 13:43
Click Here to See the Profile for zonker Click here to Send zonker a Private Message Find more posts by zonker Add zonker to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
bledar
.arcimaestro.

User info:
Registered: Oct 2003
Posts: 256 (0.03 al dì)
Location:
Corso:
Anno:
Time Online: 6 Days, 3:07:56 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

giusto , ma che confusione :)

21-03-2007 13:46
Click Here to See the Profile for bledar Click here to Send bledar a Private Message Find more posts by bledar Add bledar to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
khelidan
.grande:maestro.

User info:
Registered: Jun 2003
Posts: 1196 (0.14 al dì)
Location: Milano
Corso: Informatica
Anno: Finito....
Time Online: 13 Days, 12:08:03: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by zonker
cambia
LANGUAGE sql;
in
LANGUAGE plpgsql;
e vedrai che come per magia...:-P


Mitico! :D Ho dovuto però dare prima il comando:

code:
CREATE LANGUAGE plpgsql


perchè a quanto pare non lo caricava di default(postgres 8.2 su debian) se casomai servisse a qualcuno!

__________________
Khelidan

21-03-2007 15:31
Click Here to See the Profile for khelidan Click here to Send khelidan a Private Message Find more posts by khelidan Add khelidan to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Simeon
:D

User info:
Registered: Aug 2004
Posts: 984 (0.13 al dì)
Location: Milano
Corso: Informatica
Anno: IT IS OVER!
Time Online: 14 Days, 19:29:42 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Una piccola domandina. Ho gia trovato il modo di gestirmi i file a seconda del tipo (immagine, testo), insomma se ho un'immagine uso il solito <img src> mentre se ho un testo lo tratto a seconda del formato (ancora non so bene come fare ma ho un avvio).

Mi chiedevo pero': esiste una funzione "generica" per visualizzare sul sito un file di diverso tipo? Sarebbe realmente comoda.

Inoltre volevo sapere se voi avevate limitato i formati dei file che si possono inserire nell'applicazione. Teoricamente deve accettare testo ed immagini, io farei

immagini = .gif, .jpg
testi = .txt, .html, .doc (?)

Scartando in partenza l'upload di file di altri formati.

21-03-2007 19:55
Click Here to See the Profile for Simeon Click here to Send Simeon a Private Message Find more posts by Simeon Add Simeon to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
bledar
.arcimaestro.

User info:
Registered: Oct 2003
Posts: 256 (0.03 al dì)
Location:
Corso:
Anno:
Time Online: 6 Days, 3:07:56 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

io sono andato dal prof a chidere di questa cosa e mi ha detto che si puo scegliere il formato anche solo .txt basta che l'applicazione controlli che i file siano solo .txt e di un errore altrimenti.

21-03-2007 21:28
Click Here to See the Profile for bledar Click here to Send bledar a Private Message Find more posts by bledar Add bledar to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Simeon
:D

User info:
Registered: Aug 2004
Posts: 984 (0.13 al dì)
Location: Milano
Corso: Informatica
Anno: IT IS OVER!
Time Online: 14 Days, 19:29:42 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by bledar
io sono andato dal prof a chidere di questa cosa e mi ha detto che si puo scegliere il formato anche solo .txt basta che l'applicazione controlli che i file siano solo .txt e di un errore altrimenti.


Grandioso!

Ce la faremo, ce la faremo tutti :mad:

21-03-2007 22:06
Click Here to See the Profile for Simeon Click here to Send Simeon a Private Message Find more posts by Simeon Add Simeon to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
zonker
.illuminato.

User info:
Registered: Mar 2003
Posts: 200 (0.02 al dì)
Location:
Corso:
Anno:
Time Online: 2 Days, 6:24:53 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Io non ho vincolato il tipo di file, ma ho adottato il classico stratagemma sul web: se è un formato visualizzabile lo visualizzo, altrimenti parte il popup di download.

22-03-2007 09:48
Click Here to See the Profile for zonker Click here to Send zonker a Private Message Find more posts by zonker Add zonker to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
khelidan
.grande:maestro.

User info:
Registered: Jun 2003
Posts: 1196 (0.14 al dì)
Location: Milano
Corso: Informatica
Anno: Finito....
Time Online: 13 Days, 12:08:03: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

io ste specifiche le ho intese in altro modo,nel senso all'inserimento do una form dove scrivere e poi salvo con una file e non nel db,io lo inteso così il fatto che i contenuti siano file!

__________________
Khelidan

22-03-2007 10:37
Click Here to See the Profile for khelidan Click here to Send khelidan a Private Message Find more posts by khelidan Add khelidan to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 22:19.    Post New Thread    Post A Reply
Pages (33): « First ... « 10 11 12 13 [14] 15 16 17 18 » ... 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.099 seconds (74.31% PHP - 25.69% MySQL) con 24 query.