How can I query one Catid at a time, with a pause betwn...?
Posted: Fri May 31, 2013 5:47 am
Sorry for vague question.
We need to run a stock update on a remote server (not ours). After about 300 updates, it times out.
So I have set it to run per category. You select the category, hit the button, and it does it every time as they all have under 300 products.
However, we would like to be able to have it churn them all over - so it finds all products assigned to catid 1, and runs the query. Waits 30 seconds. Then it runs the query on the next found catid, such as catid 23.
I know how to run a query to find the catids, and the only way I know how to make a page refresh is via the HTML refresh code. But it might refresh too soon, or it might run the query on 5 products, and the refresh is set to 30 seconds, so you are waiting for about 20 seconds before it finally refreshes.
The second problem with this option is to what URL do you make it refresh. In theory it must do it to the next CatID, but how do you know what is the next CATID, and how do you not make it refresh from the start.
In theory, it's a query on catid and catname, group by catid, then query the stockid against the remote server for as long as there are stockid's to query.
Once done..... then you run the refresh perhaps. The only way I can see how to do it like that, is to do a count at the start - once the count as reached the number, then run the refresh. But how do I then know what CATid to refresh the page to?
Any help or thoughts please.
We need to run a stock update on a remote server (not ours). After about 300 updates, it times out.
So I have set it to run per category. You select the category, hit the button, and it does it every time as they all have under 300 products.
However, we would like to be able to have it churn them all over - so it finds all products assigned to catid 1, and runs the query. Waits 30 seconds. Then it runs the query on the next found catid, such as catid 23.
I know how to run a query to find the catids, and the only way I know how to make a page refresh is via the HTML refresh code. But it might refresh too soon, or it might run the query on 5 products, and the refresh is set to 30 seconds, so you are waiting for about 20 seconds before it finally refreshes.
The second problem with this option is to what URL do you make it refresh. In theory it must do it to the next CatID, but how do you know what is the next CATID, and how do you not make it refresh from the start.
In theory, it's a query on catid and catname, group by catid, then query the stockid against the remote server for as long as there are stockid's to query.
Once done..... then you run the refresh perhaps. The only way I can see how to do it like that, is to do a count at the start - once the count as reached the number, then run the refresh. But how do I then know what CATid to refresh the page to?
Any help or thoughts please.