Welcome Guest, Not a member yet? Register   Sign In
MYSQL and UNIX timestamps...
#5

[eluser]mddd[/eluser]
I think that is your own preference. Some people like the CI stuff, some like to write SQL their own way.
Using the CI class it would be:
Code:
// $year and $month are the terms you are searching for
$this->db->where('year(from_unixtime(date))', $year, false);
$this->db->where('month(from_unixtime(date))', $month, false);
$result_array = $this->db->get('events')->result_array();


Messages In This Thread
MYSQL and UNIX timestamps... - by El Forum - 04-07-2010, 06:53 PM
MYSQL and UNIX timestamps... - by El Forum - 04-07-2010, 11:32 PM
MYSQL and UNIX timestamps... - by El Forum - 04-08-2010, 12:20 AM
MYSQL and UNIX timestamps... - by El Forum - 04-08-2010, 07:31 AM
MYSQL and UNIX timestamps... - by El Forum - 04-08-2010, 07:38 AM
MYSQL and UNIX timestamps... - by El Forum - 04-08-2010, 08:58 AM
MYSQL and UNIX timestamps... - by El Forum - 04-08-2010, 09:04 AM
MYSQL and UNIX timestamps... - by El Forum - 04-08-2010, 10:15 AM
MYSQL and UNIX timestamps... - by El Forum - 04-08-2010, 05:19 PM
MYSQL and UNIX timestamps... - by El Forum - 04-09-2010, 12:48 AM
MYSQL and UNIX timestamps... - by El Forum - 04-09-2010, 05:45 AM
MYSQL and UNIX timestamps... - by El Forum - 04-09-2010, 05:56 AM
MYSQL and UNIX timestamps... - by El Forum - 04-09-2010, 06:01 AM
MYSQL and UNIX timestamps... - by El Forum - 04-09-2010, 06:15 AM
MYSQL and UNIX timestamps... - by El Forum - 04-09-2010, 06:38 AM
MYSQL and UNIX timestamps... - by El Forum - 04-09-2010, 06:43 AM
MYSQL and UNIX timestamps... - by El Forum - 04-09-2010, 06:56 AM
MYSQL and UNIX timestamps... - by El Forum - 04-09-2010, 07:00 AM
MYSQL and UNIX timestamps... - by El Forum - 04-09-2010, 07:11 AM
MYSQL and UNIX timestamps... - by El Forum - 04-09-2010, 06:14 PM
MYSQL and UNIX timestamps... - by El Forum - 04-12-2010, 12:38 AM



Theme © iAndrew 2016 - Forum software by © MyBB