This topic is locked

The field data in the current month

11/19/2013 4:45:34 AM
PHPRunner General questions
M
MarioD author

I need help:
how to format the field date in order to disable entering all data except the date of the current month.
Also, how to design sorting of data in the report based on the current month, in order to list the data from the begining until the end of the month.
Thank you.

Sergey Kornilov admin 11/19/2013

In regards to selecting data for the current month only check this:

http://xlinesoft.com/phprunner/docs/modify_sql_query_on_the_fly.htm

$query->addWhere("MONTH(CURDATE())=MONTH(DateColumn) and Year(CURDATE())=Year(DateColumn)");


In regards to input data validation check this article:

http://xlinesoft.com/blog/2013/05/21/validation-in-phprunner-and-asprunnerpro-applications/