如何在MySQL查询浏览器中设置查询参数? [英] How to set query parameters in MySQL Query Browser?
问题描述
MySQL查询浏览器可以设置参数化查询的参数吗?如果是这样,怎么办?我尝试填充参数浏览器标签,但在执行查询时似乎并没有实际设置参数.
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.
我在Google中搜索了很长时间(例如 mySQL查询浏览器已参数化),但是找不到答案.
I searched for quite a while in Google (e.g. mySQL Query Browser parameterized) but had no luck finding the answer.
我在mySQL论坛上找到了此线程不是唯一一个在这里挠头的人.
I found this thread on the mySQL forums-- sounds like I'm not the only one scratching my head here.
如果这很重要,我正在Windows Server 2008(客户端和服务器)上使用版本5.1.
I'm using Version 5.1 on Windows Server 2008 (client and server), if that matters.
推荐答案
要在查询浏览器中使用参数,查询必须这样编写:
To use parameters in Query Browser, the query has to be written like this:
select * from table where id=:id
如果参数浏览器中存在名称为"id"的参数,则查询将运行.
If a parameter with the name 'id' exists in the parameter browser, the query will run.
这篇关于如何在MySQL查询浏览器中设置查询参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!