Forum

Thread tagged as: Question, Configuration, Events

Why will this code not return any history events from the database.

Perch: 3.0.9, PHP: 5.4.45, MySQL: 5.6.36, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (3.0.9), assets (3.0.9), categories (3.0.9), perch_events (1.9.5)
App runtimes: <?php $apps_list = [ 'perch_events', ];
PERCH_LOGINPATH: /calendar_only
PERCH_PATH: /home/g70r57e28/public_html/calendar_only
PERCH_CORE: /home/g70r57e28/public_html/calendar_only/core
PERCH_RESFILEPATH: /home/g70r57e28/public_html/calendar_only/resources
Image manipulation: GD Imagick
PHP limits: Max upload 256M, Max POST 8M, Memory: 256M, Total max file upload: 8M
F1: 3b606135b33e6a102526838f4152a807
Resource folder writeable: Yes
SCRIPT_NAME: /calendar_only/core/settings/diagnostics/index.php
REQUEST_URI: /calendar_only/core/settings/diagnostics/
DOCUMENT_ROOT: /home/g70r57e28/public_html
HTTP_HOST: visitfairfieldcountyoh.org
<?php
perch_events_custom(array(
'filter'=>'eventDateTime',
'match'=>'gte',
'value'=>'date('Y-m'd),',
'sort'=>'eventDateTime',
'sort-order'=>'ASC',
'category'=>array('1-history'),
'template'=>'events/event.html',
));

?>

Do I need to add all the months. But I am filtering via the current date so I did not do that. I am trying to get all the 1-history events to show up when you click a link to a history page.

Carol Swinehart

Carol Swinehart 0 points

  • 4 years ago
Simon Clay

Simon Clay 127 points

Should 'Y-m'd' be 'Y-m-d'?

Simon Clay

Simon Clay 127 points

Actually I think the line:

'value'=>'date('Y-m'd),', 

Should be

'value' => date('Y-m-d'),

Does that help? Does debug give any clues?

Thank you. It was late and I should have just stopped. It's working now.

Drew McLellan

Drew McLellan 2638 points
Perch Support

If you keep an eye on your error log it will tell you were the problem is if something like that happens.

Simon Clay

Simon Clay 127 points

I know the feeling :)