You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a case where I need to run the exact same query against a number of different databases within one MySQL instance. I did this by running "use database_name" follow by my actual query in a loop. Sadly, I just get the results from the first query back over and over. It looks like this is because the statement is cached after the first query and then reused. Using the select_db function does not solve the problem. I was able to solve it by manually preparing and closing my statement.
The text was updated successfully, but these errors were encountered:
Perhaps select_db could reset the statement cache? You could also possibly identify "USE" statements and clear the cache if they are detected? I'm not sure either of those is worthwhile.
I have a case where I need to run the exact same query against a number of different databases within one MySQL instance. I did this by running "use database_name" follow by my actual query in a loop. Sadly, I just get the results from the first query back over and over. It looks like this is because the statement is cached after the first query and then reused. Using the
select_db
function does not solve the problem. I was able to solve it by manually preparing and closing my statement.The text was updated successfully, but these errors were encountered: