-3

I am making a table to display data from a MySQL database, this table will display all the information for the current date but next day it will be blank again and contain no information so you can see the information only for the current day, the data will exist in the database forever however and all data can be displayed upon request!

Now you know my goal i will present the problem, i dont know how to display information for only the current day in the table.

jeroen
  • 91,079
  • 21
  • 114
  • 132
Kenziiee
  • 33
  • 1
  • 5

2 Answers2

1

Use data_date=CURDATE() in where condition of your select statement. data_date is your date field separating data for each date...e.g

select * from mydata where data_date=CURDATE()

this will only give the current date data as required

lakshman
  • 656
  • 4
  • 18
0

A quick search will bring up similar questions, with answers. However you can use PHP's date() formatter.

Similar question

Glorfindel
  • 21,988
  • 13
  • 81
  • 109