Welcome Guest, Not a member yet? Register   Sign In
active record for [where date >= now()]
#6

[eluser]Michael Wales[/eluser]
Personally, I like to store everything as a Unix timestamp - that way I can utilize CI's now() function. If your database is stored using MySQL's date field type - then go with your original code... it should work.

Are you sure >= is the right operator? Have you tried <= and received the correct results - maybe your logic is incorrect.

Maybe switching the date field to a datetime type - you'd think MySQL is smart enough to run a comparison operator on a date and a datetime field and return the correct results - but who knows...


Messages In This Thread
active record for [where date >= now()] - by El Forum - 08-01-2007, 08:26 PM
active record for [where date >= now()] - by El Forum - 08-01-2007, 08:35 PM
active record for [where date >= now()] - by El Forum - 08-01-2007, 08:38 PM
active record for [where date >= now()] - by El Forum - 08-02-2007, 09:22 AM
active record for [where date >= now()] - by El Forum - 08-02-2007, 05:17 PM
active record for [where date >= now()] - by El Forum - 08-02-2007, 06:18 PM
active record for [where date >= now()] - by El Forum - 08-03-2007, 06:48 AM
active record for [where date >= now()] - by El Forum - 08-04-2007, 12:19 PM
active record for [where date >= now()] - by El Forum - 08-06-2007, 04:12 PM
active record for [where date >= now()] - by El Forum - 08-06-2007, 07:06 PM
active record for [where date >= now()] - by El Forum - 08-06-2007, 07:45 PM
active record for [where date >= now()] - by El Forum - 08-06-2007, 09:52 PM
active record for [where date >= now()] - by El Forum - 09-23-2007, 10:19 AM
active record for [where date >= now()] - by El Forum - 09-23-2007, 08:50 PM
active record for [where date >= now()] - by El Forum - 09-23-2007, 11:01 PM
active record for [where date >= now()] - by El Forum - 09-24-2007, 03:48 AM
active record for [where date >= now()] - by El Forum - 09-28-2007, 12:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB