php - how to add time in mysql query -


I am using this query

Select date_time_posting from the table, where FROM_UNIXTIME (date_time_posting, '% D-% m-% y') = '$ c_day_date'

Where $ c_day_date is being dated in the format dd-mm-yy such as 25-27-2009

My server is at different times My area has some difference about 6 hours ie that my local timezone is 6 hours ahead of my server time zone.

This query runs around midnight at approximately 1:00 am in my timezone, but at that time my server remains at the previous day's date.

Then the question at that time is not giving me the desired results. Why this problem persists when everything is already done with the data stored. At this time the difference is my query and how can I improve it ????

You can set the timezone per customer by sending a query such as:

  $ Sql ​​= "SET time_jon = timezone;"  

Check the manual to correct this problem.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -