如何防止在InstallShield中记录自定义操作的执行步骤?(How to prevent to log execution steps of Custom Action in InstallShield?)
我使用InstallShield制作了一个安装程序。 我已经写了一些自定义操作。
安装此安装程序时,这些CustomActions的日志(执行步骤)将打印在日志文件中。 但我想阻止将一些CustomActions的数据(执行步骤)记录到日志文件中。 我不想让用户知道Custom Action出于安全目的究竟做了什么。那么如何防止一些CustmAction将其执行步骤记录到日志文件中呢? 我想阻止整个CustomAction的日志。
或者我们可以在InstallShield中安装时暂停一段时间的日志记录吗?I have made one installer using InstallShield. I have written some Custom Actions in that.
While installing this installer, the logs (execution steps) of those CustomActions gets printed in log file. But I want to prevent to log some CustomActions's data (execution steps) into log file. I don't want to let user know what exactly the Custom Action is doing for security purpose.So how I can prevent some CustmAction to log their execution steps into log files ? I want to prevent whole CustomAction's logs.
Or can we pause a logging for some duration time while installation in InstallShield ?
原文:https://stackoverflow.com/questions/38617646
满意答案
尝试:
function QueryStock($cat) { $query = "SELECT * FROM stock WHERE catno = " . $cat; global $wpdb; $row = $wpdb->get_row($query); $catno = $row->catno; //Column name in table $itemname = $row->itemname; //Column name in table $price = $row->price; //Column name in table $stock = $row->stock; //Column name in table echo "There are " . $stock . " bears"; }
另外,我建议不要使用“SELECT *”。 尝试仅查询使用的列。 这对性能更好。
编辑:看到一个错字。 您的代码中有“$ catno == $ row ...”。 你应该只使用一个“=”
Eureka!!!,
It's often something missed, and it was in the MySQL query.
The query should be
SELECT * FROM stock WHERE catno = '$cat'
making$query = "SELECT * FROM stock WHERE catno = '$cat'";
I have taken on board the "SELECT *" issue @eckes and @rickonline pointed out, went for separate queries and used
$wpdb->get_var()
.Working coding is..
function QueryStock($cat) { $query1 = "SELECT catno FROM stock WHERE catno = '$cat'"; $query2 = "SELECT itemname FROM stock WHERE catno = '$cat'"; $query3 = "SELECT price FROM stock WHERE catno = '$cat'"; $query4 = "SELECT stock FROM stock WHERE catno = '$cat'"; global $wpdb; $catno = $wpdb->get_var($query1); $itemname = $wpdb->get_var($query2); $price = $wpdb->get_var($query3); $stock = $wpdb->get_var($query4); echo "There are " . $stock . " bears"; }
相关问答
更多什么是 wordpress,怎么使用...?
有什么数据库专业书籍介绍?
Wordpress没有执行mysql_query()(Wordpress not executing mysql_query())
有多少Wordpress数据库查询是正常的?(How many Wordpress database queries is normal?)
Wordpress中的mySQL查询(mySQL Queries in Wordpress)
MySQL条件连接查询(WordPress数据库)(MySQL Conditional Join Queries (WordPress DB))
使用JOIN在Wordpress中进行高级MySQL查询(Advanced MySQL query in Wordpress with JOIN)
需要帮助MySQL查询Wordpress(Need help with MySQL query for Wordpress)
Wordpress的事件日历插件 - 非常慢的MySQL查询?(Event Calendar plugin for Wordpress - very slow MySQL queries?)
Wordpress结合查询(Wordpress combine queries)
相关文章
更多upgrade steps
action 线程问题。
Solr In Action
Solr: a custom Search RequestHandler
Hadoop0.20+ custom MultipleOutputFormat
log4j快速入门示例
Commons log记录Log日志
[How to] Make custom search with Nutch(v 1.0)?(转)
Log4j 记录Log日志
页面获取ACTION的属性,页面不能弹出JS
最新问答
更多获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
如何通过引用返回对象?(How is returning an object by reference possible?)
矩阵如何存储在内存中?(How are matrices stored in memory?)
每个请求的Java新会话?(Java New Session For Each Request?)
css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
xcode语法颜色编码解释?(xcode syntax color coding explained?)
在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
Copyright ©2023 peixunduo.com All Rights Reserved.粤ICP备14003112号
本站部分内容来源于互联网,仅供学习和参考使用,请莫用于商业用途。如有侵犯你的版权,请联系我们(neng862121861#163.com),本站将尽快处理。谢谢合作!