![]() |
Joined rows in mdate() function? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Joined rows in mdate() function? (/showthread.php?tid=11586) |
Joined rows in mdate() function? - El Forum - 09-15-2008 [eluser]Joakim_[/eluser] I have a model where todays entries are shown for the user. However, I want the user's time-zone and daylight settings to be considered. I have tried to join these settings from the account table but I don't know how to include them in the mdate() function. I've tried with the code below but it wont work: Code: function todays_posts() Any help are much appreciated. Thank you very much! ![]() Joined rows in mdate() function? - El Forum - 09-15-2008 [eluser]xwero[/eluser] Are you trying to use database field values in a CI helper function? Code: mdate('%d', gmt_to_local(now(), 'accounts.timezone', 'accounts.daylight')) What you could do is something like Code: $this->db->where(array('post_date'=>time(),'accounts.timezone'=>$timezone,'accounts.daylight'=>$daylight); |