zaky2016
zaky2016

Reputation: 25

php myadmin time and date for hestorical records

I'm developing an application for managing delivery in a company using netbeans and php myadmin. I have to save in the database daily hundreds of deliveries with specific data for each but all with the date of that day, for query later like

select * from table_1 where 'date'='02/10/2016' for example. I can create a field in the table with type "date" but this date will be redundancy hundreds of times in the table just to specify one day, and the next day also and so on... What's the best way to stop the redundancy ??

Upvotes: 0

Views: 54

Answers (1)

Firoz Memon
Firoz Memon

Reputation: 4670

You could use datetime as its type which will reduce your redundancy.

And when you wish to retrive all entries of a particular date, you could try using select * from table_1 where 'date' LIKE '2016-10-02%' in your query

Upvotes: 1

Related Questions