Issue with date passing through via URL

3 posts by 2 authors in: Forums > CMS Builder
Last Post: October 23, 2019   (RSS)

By Dave - October 23, 2019

Hi nmsinc, 

Here's some feedback if you're still working on this one.

The date code looks good, you can test what's being received by PHP with: 

<?php showme($_REQUEST); ?>

And then see what SQL is getting generated (or not generated) by getRecords() with the debug option: 

  'debugSql' => true,

And then review the search docs:

And based on that I'd recommend the following changes: 

  • Change acknowledge_date:mon to acknowledge_date_month
  • Change acknowledge_date:day to acknowledge_date_day
  • Change acknowledge_date:year to acknowledge_date_year

Or if you want to quickly test it or not change your code you can just put this before getRecords(): 

  $_REQUEST['acknowledge_date_month'] = @$_REQUEST['acknowledge_date:mon'];
  $_REQUEST['acknowledge_date_day']   = @$_REQUEST['acknowledge_date:day'];
  $_REQUEST['acknowledge_date_year']  = @$_REQUEST['acknowledge_date:year'];

Hope that helps! Let me know if it works for you.  

Dave Edis - Senior Developer

By nmsinc - October 23, 2019

Worked perfect Dave - Thanks!