Forums

how to list data beyound this month

dhuizinga1 11 Dec, 2016
Hi had a lot's of data with dates in it

nou i had a list of data in the present month... I used in the front list the code

<?php
return array(":YEAR(`datum`) = YEAR(NOW()) && MONTH(`datum`) = MONTH(NOW())");
?>

all the data in this month will dispay..
BUT how can i change that the data after this month will display.

i thought it was simple to change array in <?php
return array(":YEAR(`datum`) = YEAR(NOW()) && MONTH(`datum`) > MONTH(NOW())");
?>

but that doesn't work...
who has a clue?


thnx in advance
GreyHead 11 Dec, 2016
Hi dhuizinga1,

Does this work:
<?php
return array( ":'datum' > NOW()" );
?>

Bob
dhuizinga1 11 Dec, 2016
Sorry Bob,

Nothing happens .... the list will be empty.. I';m sure that there at least three empties on january 1st in 2017.
GreyHead 11 Dec, 2016
Hi dhuizinga1,

Please add a Debugger action so that you can see the query being created - and you can then test it using PHPMyAdmin to see if it gives you the results you want.

Bob
dhuizinga1 11 Dec, 2016
bleep bleep bleep..

sorry bob

i don't understand a word what you see say..
I dont know what a Debugger action is or what it does...

i am totally unknown with php... to complicated...
sorry
GreyHead 11 Dec, 2016
Hi dhuizinga1,

The Debugger action is a ChronoForms action just like the other actions except that it shows you some useful information for debugging.

PHPMyAdmin is a tool that your web-host provides that lets you look at the database tables on your site.

Bob
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger