Filter Initial Table records

QuestionsFilter Initial Table records
Michael asked 5 years ago

Hi,

I am using a table with a large amount of records and on the first load of the table it groups and displays all records in the database. Is it possible to initially only show records from a specific date onwards to limit the initial number of records shown?
I would want however if the user searches for specific information to show all relevant information no matter what date the information was from?

Example:
I have a database with 1 million records in it but for the initial load, I only want to see records from a specific date onwards. Thus limiting the number of records to be displayed.
However, when the user want to search information on a specific client, the search would then extend to records for all date ranges,

Many thanks,

Michael

3 Answers
Michael answered 5 years ago

Hi,

Is this code:
$sarr = <<< SEARCH_JSON
{
"groupOp":"AND",
"rules":[
{"field":"name","op":"cn","data":"Maria"},
{"field":"closed","op":"eq","data":"No"}
]
}
SEARCH_JSON;

Only available on certain PHP releases?? I'm running 5.3.5 and I keep getting an error message of Parse error: syntax error, unexpected T_SL in when I try and add you code.

Thanks,

Michael

Abu Ghufran answered 5 years ago

This is known as HEREDOC syntax and it is supported in PHP from start versions.

Issue discussed here …

http://stackoverflow.com/questions/11208725/parse-error-syntax-error-unexpected-t-sl-php-heredoc

Looking at the copy-paste, it looks like you have a space character after the word "END" on the first line:

'echo <<<END '

Your Answer

0 + 20 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?