在mysql中,每个命令之间都要留一点空格 如果是这样, $query = "select * from books where " .$searchtype. "like'%" .$searchterm. "%'"; 那么print_r(),就会输出:select * from books where titlelike'%java%',like 和那些都在一起了,命令有错,应该是这样: $query = "select * from…
<form action="" type="get" id="form"> <input type="button" name="submit" id="subBtn" value="submit"> </form> 点击按钮,触发表单提交: document.getElementById("subBtn").o…
最近用Vue在搭建前端框架,在引用i18n时,运行的时候报错:Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>',在此记录下. 先看看代码:安装i18n 插件就不累述了(npm install vue-i18n) 中文:cn.js module.exports={ indexText:{ Code:'編號', } } 英文:en.js module.exports={ i…
参考文档如下解决: https://stackoverflow.com/questions/5891911/trying-to-get-property-of-non-object-in 问题如下: This question already has an answer here: Call to a member function on a non-object [duplicate] 8 answers on Control page: <?php include 'pages/db.php…
Node中使用MySQL报错: TypeError: Cannot read property 'query' of undefined at /Users/sipeng/Desktop/彭思/2017年学习/Node/sampleEjs/sampleEjs/models/user.js:: at Handshake.onConnect [:) at Handshake.Sequence.end (/Users/sipeng/Desktop/彭思/2017年学习/Node/sampleEjs/s…
在MySQL向表中插入中文时,出现:incorrect string value 错误,是由于字符集不支持中文.解决办法是将字符集改为GBK,或UTF-8.      一.修改数据库的默认字符集        ALTER DATABASE db_name DEFAULT CHARCTER SET character_name [COLLATE... ]             例子:ALTER TABLE db_mysql DEFAULT CHARCTER SET gbk           …
问题:创建mongodb帐户时,出错 > db.addUser('jyu', 'aerohive')  2015-08-05T20:03:02.767+0800 E QUERY    TypeError: Property 'addUser' of object admin is not a function   #步骤1: 刚开始以为是权限问题,以非auth方式重启mongodb mongod --dbpath=/opt/mongodb/data --logpath=/opt/mongodb/…
mysql中You can't specify target table for update in FROM clause错误的意思是说,不能先select出同一表中的某些值,再update这个表(在同一语句中). 例如下面这个sql: delete from tbl where id in ( select max(id) from tbl a where EXISTS ( ) ) group by tac ) 改写成下面就行了: delete from tbl where id in (…
很多童鞋在启动mysql的时候,碰到过这个错误, 首先,澄清一点,出现这个错误的前提是:通过服务脚本来启动mysql.通过mysqld_safe或mysqld启动mysql实例并不会报这个错误. 那么,出现这个错误的原因具体是什么呢? 哈哈,对分析过程不care的童鞋可直接跳到文末的总结部分~ 总结 下面,来分析下mysql的服务启动脚本 脚本完整内容如下: #!/bin/sh # Copyright Abandoned TCX DataKonsult AB & Monty Program KB…
Vue的报错:Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'   1.运行一下以前的一个Vue+webpack的 vue仿新闻网站  小项目,报错 由于自己vue学习不深入,老是这个报错,找了好久(确切的说是整整一下午^...^)才找到原因 -v- Uncaught TypeError: Cannot assign to read only property 'exp…