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 ... « 7 8 9 10 [11] 12 13 14 15 » ... 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

Così è un po' complicato, dovresti fare la gestione del tasto aggiungi e rimuovi tramite javascript.
Io ho risolto sempre con le tendine ma senza il tasto aggiungi:

.....
Argomenti:
argomento1 | V |
argomento2 | V |
argomento3 | V |
etc.

all'interno di ogni tendina ci sono i numeri da 1 al numero di argomernti presenti + il valore "non preferito".
Alla action page arriveranno le coppie Argomento[i],preferenza[i] a questo punto se la preferenza è "non preferito" viene scartato, se invece è un valore viene inserito con quel valore. Fatto così incorri nel "problema" che l'ordinamento è corretto ma non "stretto" ossia potresti avere più argomenti con la stesso valore di preferenza o buchi nelle preferenze tipo:
argomento1 pref.1
argomento3 pref.1
argomento5 pref.4
Non essendo richiesto dalle specifiche che l'ordinamento sia stretto già così sarebbe corretto, io però ho fatto una piccola procedura che prima di fare le insert (o update quando modifichi il profilo) te le ordini in ordine stretto e senza buchi.

Last edited by zonker on 14-03-2007 at 13:22

14-03-2007 13:17
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
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 zonker
Così è un po' complicato, dovresti fare la gestione del tasto aggiungi e rimuovi tramite javascript.
Io ho risolto sempre con le tendine ma senza il tasto aggiungi:

.....
[CUT]



Uhm, capito. Allora rimango con la mia implementazione precedente, tanto non ci sono vincoli su come fare.

14-03-2007 13:30
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
khelidan
.grande:maestro.

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

Post actions:

Edit | Report | IP: Logged

Qualcuno ha già implementato la parte di xml?Fare il parsing di un xml è tra virgolette banale ma l'inverso?Cioè passare dai nostri dati e creare un xml?Non riesco a trovare un imput per procedere,via web trovo solo tutorial su xml-->php e non viceversa!

__________________
Khelidan

14-03-2007 16:34
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

Mah...veramente creare l'xml è molto più banale che farne il parsing...
Basta che crei la prima riga sempre uguale:
<?xml version="1.0" ?>
<profili>
poi inizi a ciclare per il numero di profili dell'utente e scrivi:
<profilo>
<campo1>valore</campo1>
.....
<campon>valoren</campon>
<argomenti>
qui inizi a ciclare tra gli argomenti preferiti
<argomento>
<id>idargomento1</id>
<descrizione>descrizione1</descrizione>
<proprita>priorita1</priorita>
.....
<id>idargomento1</id>
<descrizione>descrizione1</descrizione>
<proprita>priorita1</priorita>
</argomenti>
fine del ciclio degli argomenti
</argomenti>
</profilo>
questa parte all'interno del ciclo, poi chiudi il tutto con il </profili>
Niente di più.

Last edited by zonker on 14-03-2007 at 17:30

14-03-2007 16:50
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
tandrea85
.precettore.

User info:
Registered: Sep 2004
Posts: 95 (0.01 al dì)
Location:
Corso: informatica
Anno: 1
Time Online: 18:21:48 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by uvaci
è la divisione in gruppi... :)


ma siamo sicuri? ha tolto il pdf della correzione progetti

16-03-2007 12:24
Click Here to See the Profile for tandrea85 Click here to Send tandrea85 a Private Message Find more posts by tandrea85 Add tandrea85 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Gehur
.grande:maestro.

User info:
Registered: Apr 2006
Posts: 519 (0.07 al dì)
Location: Milano
Corso: Informatica
Anno:
Time Online: 3 Days, 0:41:42 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

scusate ma come si fa la connessione al database??

e poi ho creato la funzione per contare il numero diu accessi al contenuto, ma quando scrivo sql per testarla, mi dice che la funzione non esiste..

sql: select numeroaccessi(2); dove 2 è il numero del campo id che è di tipo serial..., puo essere quello il problema??

qualcuno sa la differenza tra il tipo numeric e il tipo int??

Last edited by Gehur on 16-03-2007 at 14:05

16-03-2007 13:49
Click Here to See the Profile for Gehur Click here to Send Gehur a Private Message Find more posts by Gehur Add Gehur 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

prova a postare anche la funzione.

16-03-2007 14:53
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
Gehur
.grande:maestro.

User info:
Registered: Apr 2006
Posts: 519 (0.07 al dì)
Location: Milano
Corso: Informatica
Anno:
Time Online: 3 Days, 0:41:42 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

CREATE OR REPLACE FUNCTION numero_accessi() RETURNS void AS

BEGIN
UPDATE contenuto SET numero_accessi = numero_accessi + 1 WHERE contenuto.id = $1;
END;

LANGUAGE 'plpgsql' VOLATILE SECURITY DEFINER;
ALTER FUNCTION numero_accessi() OWNER TO postgres;

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

User info:
Registered: Apr 2006
Posts: 519 (0.07 al dì)
Location: Milano
Corso: Informatica
Anno:
Time Online: 3 Days, 0:41:42 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

per la precisione mi dice questo:

ERROR: function numero_accessi(integer) does not exist
HINT: No function matches the given name and argument types. You may need to add explicit type casts.


per lavorare uso pgadmin

Last edited by Gehur on 16-03-2007 at 15:06

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

User info:
Registered: Apr 2006
Posts: 519 (0.07 al dì)
Location: Milano
Corso: Informatica
Anno:
Time Online: 3 Days, 0:41:42 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

e per quanto riguarda la stringa di connessione al DB??

scrivo questo

$conn = @pg_connect('dbname=postgres user=postgres);
if(!$conn) {
die('Connessione fallita !<br />');
} else {
echo 'Connessione riuscita !<br />';
}
e non stampa nulla a video, se percaso levo la chiocciolina mji dice che non riconosce la funzione pg_connect

Last edited by Gehur on 16-03-2007 at 15:50

16-03-2007 15:04
Click Here to See the Profile for Gehur Click here to Send Gehur a Private Message Find more posts by Gehur Add Gehur 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 quello che riguarda la funzione ha ragione il dbms, non esiste una funzione come quella che stai tentando di interrogare...
almeno finchè non modifichi la prima parte in:
CREATE OR REPLACE FUNCTION numero_accessi(int) RETURNS void AS
La funzione che hai creato tu non richiede paramentri in ingresso.

16-03-2007 15:22
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 la parte della connessione php cedo la parola a chi lo utilizza, io sono rimasto su ASP

16-03-2007 15:23
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
Gehur
.grande:maestro.

User info:
Registered: Apr 2006
Posts: 519 (0.07 al dì)
Location: Milano
Corso: Informatica
Anno:
Time Online: 3 Days, 0:41:42 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

ooooooooook

nella creazione delle chiavi esterne è comodo/utile usare gli indici? qualcuno gli ha usati?

comunqe php ora funziona

Last edited by Gehur on 16-03-2007 at 18:00

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

User info:
Registered: Apr 2006
Posts: 519 (0.07 al dì)
Location: Milano
Corso: Informatica
Anno:
Time Online: 3 Days, 0:41:42 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

mi sono accorto che ho un conflitto tra trigger, mi spiego meglio, quando eseguo il trigger numero accessi viene effettuato un update sulla tabella contenuto, in questo modo però si incrementa anche il numero di modifiche visto che il trigger per le modifiche si attiva quando si esegue un update

come posso risolvere?

17-03-2007 20:53
Click Here to See the Profile for Gehur Click here to Send Gehur a Private Message Find more posts by Gehur Add Gehur 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

Potresti mettere un controllo nel trigger di update su contenuti: se OLD.numeroaccessi = NEW.numero accessi allora stai facendo una modifica, altrimenti la modifica è solo relativa al numero di accessi per cui non incrementi il numero di modifiche.

18-03-2007 10:11
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
All times are GMT. The time now is 03:05.    Post New Thread    Post A Reply
Pages (33): « First ... « 7 8 9 10 [11] 12 13 14 15 » ... 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.118 seconds (37.30% PHP - 62.70% MySQL) con 23 query.