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. > Community > Tech > [SQL] Il concetto "Today"
  Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
luckyz
.:Pleonastico:.

User info:
Registered: Jun 2002
Posts: 311 (0.04 al dì)
Location: Milano
Corso: Comunicazione Digitale
Anno: %-Error-%
Time Online: 4 Days, 20:04:05: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
[SQL] Il concetto "Today"

Curiosità, è possibile dire in qualche modo in sql, per la precisione in mysql trova tutti i record dove data è uguale ad oggi?
Come di fa?
Tutorial buoni sull'argomento, dove li trovo?
E se volessi fare data = ultimi 5 giorni?

Troppo buoni

Grazie a tutti.:)

__________________
Non sai che fare? ... Sfoglia la mia Gallery

02-02-2005 12:30
Click Here to See the Profile for luckyz Click Here to See the Blog of luckyz Click here to Send luckyz a Private Message Visit luckyz's homepage! Find more posts by luckyz Add luckyz to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
jdhoring
Ma saggio de che?

User info:
Registered: May 2003
Posts: 2867 (0.36 al dì)
Location: Milano
Corso: Informatica triennale
Anno: Giurassico
Time Online: 27 Days, 17:36:29 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

prova su www.mysql.com
troverai tante cose.

__________________
Furbo è colui che è molto bravo a togliersi da quei guai in cui il saggio non si sarebbe mai cacciato

Il bravo motociclista è come un buon amante: ha equilibrio, giudizio e tempismo.

Nessuna forma d'amore ha tanto rispetto per la libertà dell'altro come l'amicizia.

02-02-2005 12:39
Click Here to See the Profile for jdhoring Click Here to See the Blog of jdhoring Click here to Send jdhoring a Private Message Find more posts by jdhoring Add jdhoring to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
jdhoring
Ma saggio de che?

User info:
Registered: May 2003
Posts: 2867 (0.36 al dì)
Location: Milano
Corso: Informatica triennale
Anno: Giurassico
Time Online: 27 Days, 17:36:29 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

e ovviamente data "=" ultimi 5 giorni diventa

data >= (oggi() - 5 giorni)

__________________
Furbo è colui che è molto bravo a togliersi da quei guai in cui il saggio non si sarebbe mai cacciato

Il bravo motociclista è come un buon amante: ha equilibrio, giudizio e tempismo.

Nessuna forma d'amore ha tanto rispetto per la libertà dell'altro come l'amicizia.

02-02-2005 12:40
Click Here to See the Profile for jdhoring Click Here to See the Blog of jdhoring Click here to Send jdhoring a Private Message Find more posts by jdhoring Add jdhoring to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
luckyz
.:Pleonastico:.

User info:
Registered: Jun 2002
Posts: 311 (0.04 al dì)
Location: Milano
Corso: Comunicazione Digitale
Anno: %-Error-%
Time Online: 4 Days, 20:04:05: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

ma oggi() è un comando valido?

__________________
Non sai che fare? ... Sfoglia la mia Gallery

02-02-2005 12:41
Click Here to See the Profile for luckyz Click Here to See the Blog of luckyz Click here to Send luckyz a Private Message Visit luckyz's homepage! Find more posts by luckyz Add luckyz to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
saradid
.grande:maestro.

User info:
Registered: Aug 2003
Posts: 753 (0.09 al dì)
Location:
Corso: Informatica Serale
Anno: 2
Time Online: 27 Days, 15:44:06: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

scusate , ma in sql si usa la sysdate

02-02-2005 12:44
Click Here to See the Profile for saradid Click Here to See the Blog of saradid Click here to Send saradid a Private Message Find more posts by saradid Add saradid to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
luckyz
.:Pleonastico:.

User info:
Registered: Jun 2002
Posts: 311 (0.04 al dì)
Location: Milano
Corso: Comunicazione Digitale
Anno: %-Error-%
Time Online: 4 Days, 20:04:05: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by saradid
scusate , ma in sql si usa la sysdate


quindi?

Potrei, tramite php ottenere la data di oggi

$date=date("dmY");

e quindi scegliere tutti i record dove data è uguale a $date...
...
... giusto?

E se invece voglio gli ultimi 3 giorni?

TNX

__________________
Non sai che fare? ... Sfoglia la mia Gallery

02-02-2005 12:53
Click Here to See the Profile for luckyz Click Here to See the Blog of luckyz Click here to Send luckyz a Private Message Visit luckyz's homepage! Find more posts by luckyz Add luckyz to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
saradid
.grande:maestro.

User info:
Registered: Aug 2003
Posts: 753 (0.09 al dì)
Location:
Corso: Informatica Serale
Anno: 2
Time Online: 27 Days, 15:44:06: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

campo >(sysdate-n)
dove n e' il numero che vuoi di giorni passati

02-02-2005 12:57
Click Here to See the Profile for saradid Click Here to See the Blog of saradid Click here to Send saradid a Private Message Find more posts by saradid Add saradid 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:25.    Post New Thread    Post A Reply
  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.106 seconds (54.83% PHP - 45.17% MySQL) con 25 query.