How to set query parameters in MySQL Query Browser?

馋奶兔 提交于 2019-12-11 05:03:37

问题


Can the MySQL Query Browser set parameters of a parameterized query? If so, how? I tried populating the Parameter Browser tab but it doesn't seem to actually set parameters when I execute the query.

I searched for quite a while in Google (e.g. mySQL Query Browser parameterized) but had no luck finding the answer.

I found this thread on the mySQL forums-- sounds like I'm not the only one scratching my head here.

I'm using Version 5.1 on Windows Server 2008 (client and server), if that matters.


回答1:


To use parameters in Query Browser, the query has to be written like this:

select * from table where id=:id

If a parameter with the name 'id' exists in the parameter browser, the query will run.



来源:https://stackoverflow.com/questions/1294974/how-to-set-query-parameters-in-mysql-query-browser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!