I have a table with data spanning more than one year and want the user to input a year to select only that year.
Adapting the code given in a previous thread (
www.ari-soft.com/ARI-Data-Tables/35625-Form-integration-to-Ari-Data-Tables.html), I have the following:
HTML in article
Code: |
<p>Select year (to reset, empty filter and submit)</p>
<form action="#" method="post">Year:<input name="start" value="1895" type="text" /> <input type="submit" value="Select" /> </form>
<p>{aridatatables moduleId="136"}{/aridatatables}</p>
|
SQL query
Code: |
SELECT
year,
image_no,
surname,
first_names,
remarks
FROM
ket4k_ccd_willowmore
WHERE
({$REQUEST:start|empty:''} = '' OR year = {$REQUEST:start|empty:''})
|
Article:
http://www.eggsa.org/sarecords/index.php/civil-registration-deaths/212-willowmore-civil-deaths
With many entries in the table it becomes very slow when loading. I have server side pagination switched off because it does not seem to be compatible with the above.
To speed up the loading I'd like it to only load data for ONE year on loading. I added
value="1895" in the input form, hoping it will only load that year, but it loads all the data on start up.
The following article has more entries in the table nad one can see how it effects the loading speed:
www.eggsa.org/sarecords/index.php/civil-registration-deaths/219-albany-civil-deaths
Any suggestions?
Thanks,
Corney