问题
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