Advertisement
Guest User

mysql pegar ultimos 6 meses

a guest
Feb 27th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. eu tenho um campo no banco dataAtual , e preciso pegar os ultimos 6 meses dele
  2.  
  3. ex:
  4. dataAtual mes
  5. '2017-02-06' 02
  6. '2017-02-06' 02
  7. '2017-03-16' 03
  8. '2017-03-16' 03
  9. Preciso pegar todos esses dados, ai sera 3,2,(1,12,11,10[se tiver tido uma leitura]) se não tiver, so pego os que tiver lá.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement