question regarding 'where' clause

2 posts by 2 authors in: Forums > CMS Builder
Last Post: February 8, 2011   (RSS)

Re: [kovali] question regarding 'where' clause

By Jason - February 8, 2011

Hi Koen,

You can use the php date() function to get the current year from the server like this:

$currentYear = date("Y");

You can then use it in your where clause like this:

'where' => "year = '$currentYear'",

In this example, it's important to use the double quotes (").

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/