Jump to content
Fórum Script Brasil
  • 0

intervalo entre datas


Peter Charles

Question

Bom dia,

tenho um calendario que pega a data de hoje e os proximos 30 dias, eu recebo a data numa variavel $curdate formato sql 2011-12-25 e jogo ela nessa query

insert into fdt_new values (NULL, '$nome','$celular','$atividades','$status[$

i]','$supervisor[$i]','$cluster[$i]',

'$area1','$area2','$manha[$i]','$tarde[

$i]','$curdate 23:59:59','$login',0,0)

Agora preciso criar um intervalo nessa query,

Sendo a variavel $curdate pegue a data seguinte

ex:

$curdate = 2011-12-25

$resultado final = 2011-12-26

sei que daria pra fazer com o proprio comando sql

CURDATE() + INTERVAL $i DAY

mas preciso que CURDATE() seja uma variavel

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652k
×
×
  • Create New...