Re: Re: [orazio] Get options from database limit??
2 posts by 2 authors in: Forums > CMS Builder
Last Post: February 10, 2021 (RSS)
By rez - January 28, 2021 - edited: January 28, 2021
In response to: https://www.interactivetools.com/forum/forum-posts.php?postNum=2216990#post2216990
I have a draft beer list on a website. In an editor, the admin simply fills a checkbox of which draft beers are currently available. When they create a new beer in this editor, in a drop list, they select a brewer from another table of brewers. I have exceeded the 1000 item limit in the drop list when selecting a brewer. The brewer records only contain one filed, the name of the brewer. No region or other info.
I'm not sure how to avoid the instructions on how to increase the number shown in a drop list selection. There is nothing else in the brewer list besides the name so I can't see how I would setup a dependency situation (never tried that plugin).
Any advice on a situation like this where it's more than 1k records in a drop list?
By Jenna - February 10, 2021
Hi rez,
If you were to use the "Get options from MySQL query (advanced)" as seen in the screenshot attached you would be able to set your own limit or leave out the limit entirely.
You could use a query like :
SELECT yourFieldName
FROM `<?php echo $TABLE_PREFIX ?>your_tableName`
ORDER BY yourFieldName ASC
Feel free to omit the ORDER BY clause, but it would be handy in this case because you have >1000 records to display. It would default to orderBy the numerical index (num) column of your brewers table.
Let me know if that helps you with your question or if I should dig in deeper and find something else to help you out.
interactivetools.com