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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

×
×
  • 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.