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 da consegnare a settembre.
Pages (4): [1] 2 3 4 »   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
carla86
.illuminato.

User info:
Registered: Dec 2006
Posts: 219 (0.03 al dì)
Location: Milano
Corso: Informatica
Anno: Terzo
Time Online: 6 Days, 21:40:54 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
progetto da consegnare a settembre.

Io sono alle prime armi cn php e mysql; e devo consegnare il progetto a settembre..
Sono a buon punto ma vorrei avere un parere sulla gestione dei turni.
Mi spiego meglio: Il testo dice ke un giocatore quando non è di turno può visualizzare i suoi dati (la nazione, quanti pi, quante citta e cosi via...) quindi nn lo posso sloggare ma allo stesso tempo gli devo togliere la possibilità d fare azioni..
Cosa avete fatto voi?

GRAZIE

02-09-2009 21:39
Click Here to See the Profile for carla86 Click here to Send carla86 a Private Message Find more posts by carla86 Add carla86 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
darkshadow
Are You From The Past?

User info:
Registered: Jul 2007
Posts: 485 (0.08 al dì)
Location: Milano
Corso: Informatica Magistrale
Anno: 1
Time Online: 13 Days, 13:38:56 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

 
un bel flag sul db (attivo, non attivo)??? se attivo è il suo turno altrimenti vede solo le statistiche.

__________________
by Ð@rk§h@ÐØw

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

User info:
Registered: Dec 2006
Posts: 219 (0.03 al dì)
Location: Milano
Corso: Informatica
Anno: Terzo
Time Online: 6 Days, 21:40:54 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

ok ma quindi tu nn hai considerato i connessi e i nn connessi ma semplicemente tutti..

x fare finire il turno hai messo un semplice bottone o anke una scadenza d tempo della sessione?

03-09-2009 09:17
Click Here to See the Profile for carla86 Click here to Send carla86 a Private Message Find more posts by carla86 Add carla86 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
darkshadow
Are You From The Past?

User info:
Registered: Jul 2007
Posts: 485 (0.08 al dì)
Location: Milano
Corso: Informatica Magistrale
Anno: 1
Time Online: 13 Days, 13:38:56 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by carla86
ok ma quindi tu nn hai considerato i connessi e i nn connessi ma semplicemente tutti..

x fare finire il turno hai messo un semplice bottone o anke una scadenza d tempo della sessione?


non ho capito.

cmq quello che intendo io è che sulla tabella giocatore o dove vuoi hai un campo attivo. Un utente prima insersce le sue credenziali per giocare. Qui oltre a controllare che nick e psw siano corrette ti prendi anche il valore di attivo. Se è true allora è il suo turno altrimenti vede solo le statistiche. non so se mi sono spiegato meglio.
sull'altro punto credo che oltre al bottone sia necessario inserire un timeout se no un utente può rimanere all'infinito senza far giocare a gli altri.


ds

__________________
by Ð@rk§h@ÐØw

03-09-2009 11:50
Click Here to See the Profile for darkshadow Click here to Send darkshadow a Private Message Find more posts by darkshadow Add darkshadow to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
R1cky`
dsy developer

User info:
Registered: Oct 2007
Posts: 218 (0.03 al dì)
Location:
Corso: Informatica Magistrale
Anno: Secondo
Time Online: 1 Day, 13:11:53 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Io ho fatto in questo modo:

Il giocatore fa il login e si trova in modalità di sola visualizzazione. Se vuol iniziare il turno preme il bottone "inizio turno". Se non c'è nessun altro giocatore attualmente in turno comincia, altrimenti rimane in coda fino a quando il giocatore che è in turno preme il bottone "termina turno".

Posso confermarti che Montanelli è abbastanza flessibile su questa cosa dei turni, perchè non è prettamente inerente all'sql. Un bottone "termina turno" va più che bene.

03-09-2009 20:27
Click Here to See the Profile for R1cky` Click here to Send R1cky` a Private Message Find more posts by R1cky` Add R1cky` to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
carla86
.illuminato.

User info:
Registered: Dec 2006
Posts: 219 (0.03 al dì)
Location: Milano
Corso: Informatica
Anno: Terzo
Time Online: 6 Days, 21:40:54 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

@darkshadow --> Intendevo ke tu hai un solo flag attivo/nn attivo;
nn hai anche un flag connesso nn connesso.
Semplicemente su tutti quelli registrati controlli il flag attivo non attivo...
Io invece volevo mettere un flag x i connessi xo' ho paura d incasinarmi la vita!

@R1cky --> grazie!! invece su cosa montanelli è intransigente!

GRAZIE A TUTTI!!!!!

07-09-2009 17:12
Click Here to See the Profile for carla86 Click here to Send carla86 a Private Message Find more posts by carla86 Add carla86 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
R1cky`
dsy developer

User info:
Registered: Oct 2007
Posts: 218 (0.03 al dì)
Location:
Corso: Informatica Magistrale
Anno: Secondo
Time Online: 1 Day, 13:11:53 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by carla86

@R1cky --> grazie!! invece su cosa montanelli è intransigente!


Con noi Montanelli è stato bravo. Alla fine importa che tu sia sicura di quello che hai fatto e che sappia motivare le scelte implementative, sempre che non hai fatto degli errori madornali...

07-09-2009 18:31
Click Here to See the Profile for R1cky` Click here to Send R1cky` a Private Message Find more posts by R1cky` Add R1cky` to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
darkshadow
Are You From The Past?

User info:
Registered: Jul 2007
Posts: 485 (0.08 al dì)
Location: Milano
Corso: Informatica Magistrale
Anno: 1
Time Online: 13 Days, 13:38:56 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

 
una domanda forse un po banale ma ve la faccio lo stesso.
Per le citta: Voi considerate il nome come unico a livello globale o solo a livello di nazione??
la metto in modo diverso: nel vostro db possono esistere citta con lo stesso nome ma di nazioni diverse??

stessa domanda per gli eserciti.

__________________
by Ð@rk§h@ÐØw

07-09-2009 20:19
Click Here to See the Profile for darkshadow Click here to Send darkshadow a Private Message Find more posts by darkshadow Add darkshadow to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
carla86
.illuminato.

User info:
Registered: Dec 2006
Posts: 219 (0.03 al dì)
Location: Milano
Corso: Informatica
Anno: Terzo
Time Online: 6 Days, 21:40:54 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

nel mio db no.. nel senso ke era uno dei primi problemi ke mi ero posta, sia x quanto riguarda i nomi d citta sia x quanto riguarda i nomi degli eserciti e avevo chiesto a montanelli.
La sua risposta è stata ke il nome deve essere unico, deve identificare la città..

07-09-2009 20:25
Click Here to See the Profile for carla86 Click here to Send carla86 a Private Message Find more posts by carla86 Add carla86 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
darkshadow
Are You From The Past?

User info:
Registered: Jul 2007
Posts: 485 (0.08 al dì)
Location: Milano
Corso: Informatica Magistrale
Anno: 1
Time Online: 13 Days, 13:38:56 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

quindi unico a livello globale??

__________________
by Ð@rk§h@ÐØw

07-09-2009 21:31
Click Here to See the Profile for darkshadow Click here to Send darkshadow a Private Message Find more posts by darkshadow Add darkshadow to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
carla86
.illuminato.

User info:
Registered: Dec 2006
Posts: 219 (0.03 al dì)
Location: Milano
Corso: Informatica
Anno: Terzo
Time Online: 6 Days, 21:40:54 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

si unico a livello globale, tant'è ke l'ho scelto come chiave primaria.

07-09-2009 21:43
Click Here to See the Profile for carla86 Click here to Send carla86 a Private Message Find more posts by carla86 Add carla86 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
carla86
.illuminato.

User info:
Registered: Dec 2006
Posts: 219 (0.03 al dì)
Location: Milano
Corso: Informatica
Anno: Terzo
Time Online: 6 Days, 21:40:54 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

mi sono appena messa su i trigger e le funzioni (ho fatto prima la parte web) ma ho dei dubbi:
1. nelle funzioni sql nn posso usare le tuple NEW e OLD, se nn ho capito male le posso usare solo nel trigger, giusto?!
2. ma nel trigger nn posso dichiarare variabili, vero?
3. nei trigger nell'if posso avere più d un'istruzione?
4. un utente sposta i pi dalla nazione alla citta. come faccio a fare partire un update su tutte e due le tabelle?

se qualcuno ke ha gia consegnato potesse mettere un esempio sarebbe molto utile..
grazie

07-09-2009 22:44
Click Here to See the Profile for carla86 Click here to Send carla86 a Private Message Find more posts by carla86 Add carla86 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
darkshadow
Are You From The Past?

User info:
Registered: Jul 2007
Posts: 485 (0.08 al dì)
Location: Milano
Corso: Informatica Magistrale
Anno: 1
Time Online: 13 Days, 13:38:56 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

1. Da quel che mi risulta no.
2. Si, si possono dichiarare.
3. Si, è come nei normali linguaggi di programmazione puoi usare i connettivi AND OR e la negazione (Not).
4. Prima controlli che i dati inseriti nella tabella che ha attivato il trigger siano giusti poi al suo interno fai una normale update nella tabella nazione per aggiornare (aggiungere/togliere) i PI assegnati alla città.

__________________
by Ð@rk§h@ÐØw

08-09-2009 08:17
Click Here to See the Profile for darkshadow Click here to Send darkshadow a Private Message Find more posts by darkshadow Add darkshadow to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
carla86
.illuminato.

User info:
Registered: Dec 2006
Posts: 219 (0.03 al dì)
Location: Milano
Corso: Informatica
Anno: Terzo
Time Online: 6 Days, 21:40:54 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

scusami ti scrivo un trigger che ho provato a inserire e ke mysql mi da errore d sintassi:
(ho una tabella citta e una tabella nazione)

create trigger prova
before update on citta
for each row
begin
declare diff integer
declare nome varchar(20)
if new.vi>old.vi then
diff=new.vi-old.vi
nome=nazione
update nazione set pi=pi-diff where nomenazione=nome
update citta set new.ab=old.ab+3 and new.ra=old.ra-3 and new.rn=old.rn-3
endif
end;

mi sai dire se è corretto? grazie

08-09-2009 08:49
Click Here to See the Profile for carla86 Click here to Send carla86 a Private Message Find more posts by carla86 Add carla86 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
darkshadow
Are You From The Past?

User info:
Registered: Jul 2007
Posts: 485 (0.08 al dì)
Location: Milano
Corso: Informatica Magistrale
Anno: 1
Time Online: 13 Days, 13:38:56 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

 
che errore ti da??

__________________
by Ð@rk§h@ÐØw

08-09-2009 09:14
Click Here to See the Profile for darkshadow Click here to Send darkshadow a Private Message Find more posts by darkshadow Add darkshadow to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 04:07.    Post New Thread    Post A Reply
Pages (4): [1] 2 3 4 »   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.042 seconds (85.88% PHP - 14.12% MySQL) con 26 query.