Jump to content

time() function


shamsuljewel

Recommended Posts

Hi guys..I am using time function to insert a data to the table

INSERT INTO table(name,insert_date) Values('$name','time()')

so when I want to search a specific name on specific date by mysql query how should I do it?

coz time() function insert 01022332 like this valu how should I search a date suppose 2008-01-21 entries?

 

Link to comment
https://forums.phpfreaks.com/topic/87894-time-function/
Share on other sites

that depends on your SQL creation for that field

 

but it wud be easier if ur SQL was in date or datetime format. which makes building the query much easier than working with time() formats. use now() instead in the query and either date or datetime in the creation of yer table fields.

Link to comment
https://forums.phpfreaks.com/topic/87894-time-function/#findComment-449709
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.